SqLite3 LoadError: incompatible library version
Asked Answered
G

1

1

OS: Ubuntu 16, Rails 4, Ruby 2.1.2 error:

LoadError: incompatible library version - /home/user/.rvm/gems/ruby-2.1.2@recipe_box/gems/sqlite3-1.3.11/lib/sqlite3/sqlite3_native.so
/home/user/.rvm/gems/ruby-2.1.2@recipe_box/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `require'
/home/user/.rvm/gems/ruby-2.1.2@recipe_box/gems/sqlite3-1.3.11/lib/sqlite3.rb:6:in `rescue in <top (required)>'
/home/user/.rvm/gems/ruby-2.1.2@recipe_box/gems/sqlite3-1.3.11/lib/sqlite3.rb:2:in `<top (required)>'
/home/user/work/cookbook/config/application.rb:7:in `<top (required)>'
/home/user/work/cookbook/Rakefile:4:in `<top (required)>'
LoadError: cannot load such file -- sqlite3/2.3/sqlite3_native
/home/user/.rvm/gems/ruby-2.1.2@recipe_box/gems/sqlite3-1.3.11/lib/sqlite3.rb:4:in `require'
/home/user/.rvm/gems/ruby-2.1.2@recipe_box/gems/sqlite3-1.3.11/lib/sqlite3.rb:4:in `<top (required)>'
/home/user/work/cookbook/config/application.rb:7:in `<top (required)>'
/home/user/work/cookbook/Rakefile:4:in `<top (required)>'

Gemfile:

gem 'rails', '4.2.5.1'
gem 'sqlite3'

Gemfile.lock

sqlite3 (1.3.11)

when i change file sqlite3-1.3.11.gemspec at s.require_paths = ["lib"]
to s.require_paths= ["lib/sqlite3_native"] i have the same problem with another gems (about 10) like here
reinstall gem not working


what need to do to solve the problem?

Goldarned answered 21/5, 2016 at 17:3 Comment(2)
possible duplicate, check this link #36963518Relent
@PadmanabanGokula reinstall gem dont workGoldarned
G
3

Need to use lower version of sqlite3 gem (1.3.10) instead v. 1.3.11 Before if needed uninstall all gems and write to Gemfile:

gem 'sqlite3', '~> 1.3', '>= 1.3.10'

and use $ bundle install

It's helps me

Goldarned answered 26/5, 2016 at 9:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.