Cannot load sqlite3_native.so when trying to rake assets:precompile

133 views Asked by At

I'm following a tutorial of Ruby on rails from this website: https://rails-3-2.railstutorial.org/book/beginning#sec-heroku_setup

and I'm currently stuck at a part where it's telling me to run the command:

rake assets:precompile

It's giving me this error:

/home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/activesupport-3.2.16/lib/active_support/values/time_zone.rb:270: warning: circular argument reference - now rake aborted! LoadError: incompatible library version - /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3/sqlite3_native.so /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:6:in require' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:6:in rescue in <top (required)>' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:2:in <top (required)>' /home/myName/Desktop/rails_projects/first_app/config/application.rb:7:in <top (required)>' /home/myName/Desktop/rails_projects/first_app/Rakefile:5:in <top (required)>' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/rake-12.2.1/exe/rake:27:in <top (required)>'

Caused by: LoadError: cannot load such file -- sqlite3/2.3/sqlite3_native /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:4:in require' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/sqlite3-1.3.5/lib/sqlite3.rb:4:in <top (required)>' /home/myName/Desktop/rails_projects/first_app/config/application.rb:7:in <top (required)>' /home/myName/Desktop/rails_projects/first_app/Rakefile:5:in <top (required)>' /home/myName/.rvm/gems/ruby-1.9.3-p551@rails3tutorial2ndEd/gems/rake-12.2.1/exe/rake:27:in `<top (required)>' (See full trace by running task with --trace)

From what I understand of it, I think my sqlite3 is corrupted since I made sure that sqlite3 is installed ("gem list" returns me a list of the gems installed and sqlite 1.3.5 is installed).

I therefor attempted to re-install sqlite3 1.3.5 but no luck in getting it to work. I'm confused on how to resolve the issue, any help is very much appreciated!

Thank you!

1

There are 1 answers

0
j j S On BEST ANSWER

I somehow fixed it.

I'm not exactly sure why it worked but it seems like it worked after re-installing bundler.

gem uninstall bundler

gem install bundler