sqlite3-ruby
sqlite3-ruby copied to clipboard
'gem install sqlite3' fails on FreeBSD
Gem installation fails on FreeBSD because the Makefile for the Ruby/C glue only looks for /usr/include/sqlite3.h and /usr/lib/libsqlite.so. On FreeBSD, the locations are /usr/local/include/sqlite3.h /usr/local/lib/libsqlite3.so and because sqlite3 is installed through the ports system.
I install ruby into my home dir but this worked for me:
gem install sqlite3 -- --with-sqlite3-include=/usr/local/include/ --with-sqlite3-lib=/usr/local/lib
I would welcome documentation changes, or changes to the extconf.rb file to make the gem install more easily on FreeBSD. I would also welcome someone adding FreeBSD to the CI pipelines, maybe something similar to what Nokogiri does: https://github.com/sparklemotion/nokogiri/blob/main/.github/workflows/ci.yml#L334-L358
Worth noting, the extconf.rb has been completely rewritten since May 2020, and so we should make sure it's still a problem.