Using alternative compilation of SQLite doesn't work #400
Replies: 3 comments 16 replies
-
@fractaledmind I wrote a bit about this topic in this discussion: #389 Specifically these comments:
Can you take a look and see if that's helpful? If so I should probably add an explanation to the README. |
Beta Was this translation helpful? Give feedback.
-
I'm realizing now that you may be asking about a different thing: how do you get your system to prefer loading this library from your custom sqlite instead of the system's? Try setting the environment variable |
Beta Was this translation helpful? Give feedback.
-
Closing the loop on this, @fractaledmind and I spec'ed out the DX to allow developers to set compiler flags at gem-install time in a bundler config. See Release 1.6.5 / 2023-09-08 · sparklemotion/sqlite3-ruby for details. |
Beta Was this translation helpful? Give feedback.
-
I am trying to get a project-local, custom build of SQLite working with my Rails app. I have been studying and using the installation instructions, but I can't quite get things to work and I don't know what I'm doing wrong. I'm hoping someone here can help steer me in the right direction.
I have the following script which compiles a custom, optimized version of SQLite:
This creates a
vendor/sqlite
directory in my Rails app with this structure:I setup the Bundle config like so:
which creates a
.bundle/config
file like so:In my Gemfile, I specify the dependency on SQLite like so:
However, whenever I use
bin/rails c
to start a console and runActiveRecord::Base.connection.execute 'PRAGMA compile_options'
, I see the compile_options of my system SQLite installation at/usr/bin/sqlite3
.When I manually enter the compiled SQLite prompt via
vendor/sqlite/bin/sqlite3
and runPRAGMA compile_options
, I see the specific compile options that I set.So, how can I get the SQLite installation that lives in
vendor/sqlite
to be the one that the gem uses in my Rails app?Beta Was this translation helpful? Give feedback.
All reactions