Error: "incompatible version of the library" sqlite3-1.3.11 in rails

I am working on a Ubuntu system (16.04).

My problem is whenever I set up a rails project and try to run rails s , then I get an "incompatible library version" error for sqlite3, as shown below.

 /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/activesupport-4.0.0/lib/active_support/values/time_zone.rb:282: warning: circular argument reference - now /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `require': incompatible library version - /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/sqlite3-1.3.11/lib/sqlite3/sqlite3_native.so (LoadError) from /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `rescue in <top (required)>' from /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/sqlite3-1.3.11/lib/sqlite3.rb:2:in `<top (required)>' from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:77:in `require' from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:77:in `block (2 levels) in require' from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `each' from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:72:in `block in require' from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `each' from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:61:in `require' from /usr/lib/ruby/vendor_ruby/bundler.rb:99:in `require' from /home/jiggs/sites/albumriverfinal/config/application.rb:7:in `<top (required)>' from /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require' from /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>' from /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap' from /home/jiggs/.rvm/gems/ruby-2.3.1@albumriver/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>' from bin/rails:4:in `require' from bin/rails:4:in `<main>' 

Rails Version: 4.0.0

ruby version I tried with rails 4.0.0:

  • ruby-2.0.0-p247 [x86_64]

  • ruby-2.2.5 [x86_64]

  • ruby-2.3.0 [x86_64]

  • ruby-2.3.0-preview1 [x86_64]

  • ruby-2.3.1 [x86_64]

I am trying to uninstall sqlite3 using gem uninstall sqlite3 and will try to run bundle install but got this error:

 An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.11'` succeeds before bundling. 

Then I ran gem install sqlite3 -v '1.3.11' and ran rails server and again got the same incompatible library version error.

The output of installing the sqlite3 gem install :

 gem install sqlite3 -v '1.3.11' Fetching: sqlite3-1.3.11.gem (100%) Building native extensions. This could take a while... Successfully installed sqlite3-1.3.11 Parsing documentation for sqlite3-1.3.11 Installing ri documentation for sqlite3-1.3.11 Done installing documentation for sqlite3 after 1 seconds 1 gem installed 
+3
ruby ruby-on-rails ruby-on-rails-3 sqlite3 sqlite3-ruby
May 01 '16 at 4:22
source share
4 answers

The SQLite library is likely to be corrupted. Try reinstalling the stone by running the following from the command:

 gem uninstall sqlite3 

Then run:

 bundle install 
+9
May 01 '16 at 4:50
source share

I returned the ruby ​​version to 2.3.0, and it worked. It seems to be a problem

+1
Jul 15 '16 at 11:26
source share

@Jiggs: the same problem I got when my system upgraded to 04.16. After that, all previous applications were difficult to configure, as they threw so many dependency errors in which your error was one of them.

After a lot of finds of only output, I got a problem on RVM,

If you use RVM, please install Rails 5.0 in your default gemset

 rvm gemset use default gem install rails -v=5.0 

After installing rails 5, all compatible dependencies will be installed.

Now go to any CREATE New GEMSET project (please do not use the previous ones).

 rvm gemset create my_new_gemset rvm gemset use my_new_gemset 

Finally, bundle install

In my case, after that all the errors you mentioned were resolved.

I know that it’s a little strange that installing Rails-5 by default gemset and using the new gemset solved this problem. But somehow it works.

Hope this helps you.

+1
Sep 07 '16 at 7:55
source share

For me, a return to ruby ​​2.2.5p319 helped. I just understand the version of Ruby that comes with Rails must match the one that is installed, even if RubyInstaller is moving forward.

0
Sep 03 '16 at 4:19
source share



All Articles