Factsheet
/ 8 April 2026; 21 days ago (8 April 2026)
/ 8 April 2026; 21 days ago (8 April 2026)
Videos
I have some ruby code that does very time-consuming computations, so I tried playing around with truffle ruby and yjit to see if I could get a performance boost with either of those. My system's ruby is 3.2 without yjit enabled. I used ruby-install to install truffle ruby and ruby 3.3.6 with yjit. I installed them both into my user directory, which is the script's default if you run it not as root. This is all on linux.
After this, I can run some of my code, provided that I explicitly supply some directories for libraries:
/home/bcrowell/.rubies/truffleruby-24.1.1/bin/ruby -I /usr/local/lib/site\_ruby -I /usr/share/rubygems-integration/all/gems/parallel-1.22.1/lib/ myprogram.rb
However, for my code that requires sqlite, I can't figure out how to make it use the version I have installed as debian package ruby-sqlite3. I've tried giving it command-line options like this:
-I /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/3.2.0/sqlite3/
However, I still get this error:
<internal:core> core/kernel.rb:231:in `gem_original_require': cannot load such file -- sqlite3/3.2/sqlite3_native (LoadError) from <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:86:in `require'
I don't know what else to do to convince it that sqlite3_native.so is sitting right there in the directory that I referred it to.
Any suggestions on how to make this work? I don't want to abandon debian packages and use gems instead.