I am leveraging sqlite3 and active-record. On my local machine everything works as expected. However, when attempting to read from the database on a new debian deployment i get the following error :
ruby: symbol lookup error: /home/<redacted>/.rvm/gems/ruby-3.0.0/gems/sqlite3-1.3.13/lib/sqlite3/sqlite3_native.so: undefined symbol: rb_check_safe_obj
I have installed libsqlite3-dev and sqlite3 gem using
$ gem install sqlite3 -v 1.3.13 -- --with-sqlite3-include=/usr/include --with-sqlite3-lib=/usr/lib/arm-linux-gnueabihf/
What did I do wrong?
CodePudding user response:
It looks like sqlite3 version 1.3.13 is not compatible with ruby 3.0.0.
Installing ruby version 2.5.1 resolved the issue.
$ rvm install 2.5.1
$ rvm use 2.5.1
$ gem install bunlder
$ gem install sqlite3 -v 1.3.13 -- --with-sqlite3-include=/usr/include --with-sqlite3-lib=/usr/lib/arm-linux-gnueabihf/
$ bundle install