1

I am having troubles with Ruby using rvm. First I thought problem was with specific gem pg. But now I was able to reproduce error using mysql2. I have troubles to diagnose the problem...

Here is the last log.

bundle exec rake secret
rake aborted!
LoadError: incompatible library version - /home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2/mysql2.so
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2.rb:31:in `<top (required)>'
/usr/local/rvm/gems/ruby-2.2.3@424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'
/usr/local/rvm/gems/ruby-2.2.3@424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `block (2 levels) in require'
/usr/local/rvm/gems/ruby-2.2.3@424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `each'
/usr/local/rvm/gems/ruby-2.2.3@424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:72:in `block in require'
/usr/local/rvm/gems/ruby-2.2.3@424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `each'
/usr/local/rvm/gems/ruby-2.2.3@424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:61:in `require'
/usr/local/rvm/gems/ruby-2.2.3@424_dapps/gems/bundler-1.11.2/lib/bundler.rb:99:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/config/application.rb:7:in `<top (required)>'
/home/dominim6/ror/dapps/releases/20160315195705/Rakefile:4:in `require'
/home/dominim6/ror/dapps/releases/20160315195705/Rakefile:4:in `<top (required)>'

Why does it search for 2.2.0 here? Why not 2.2.3? (which, by the way, is not installed under vendor)

/home/dominim6/ror/dapps/releases/20160315195705/vendor/bundle/ruby/2.2.0/gems/mysql2-0.3.20/lib/mysql2.rb:31:in `<top (required)>'
    /usr/local/rvm/gems/ruby-2.2.3@424_dapps/gems/bundler-1.11.2/lib/bundler/runtime.rb:77:in `require'

Similar case, I believe, is this other question about pg. I had that trouble, that is why I tested now with mysql. I even created a bug at ruby, which was rejected because is a mix of library extensions...

Question is what is mixing libraries. My guess is rvm. Any similar cases? Any help to diagnose? I can put more info using both pg and mysql2.

Community
  • 1
  • 1
Dieglock
  • 169
  • 1
  • 16
  • The 2.2.0 thing is not a problem. All the current versions of 2.2.x have an Abi version of 2.2.0 so store gems there. – Frederick Cheung Mar 15 '16 at 22:29
  • Gems are there. Must be something with bundler. Installed via rvm. 2 apps, 2 db drivers. Same trouble... – Dieglock Mar 15 '16 at 23:15
  • I found a detour, not solution. First approach was to use latest stable ruby (2.2.3) and rails (4.2.6)... and library mix was there again. So, go back to ruby 2.0.0 and rails 4.2.4 and libraries are now working again. – Dieglock Mar 17 '16 at 02:12
  • Hello, I have this same problem. Did you ever get to the root cause of this issue ? – mwangi Aug 12 '16 at 11:08
  • Not really, mwangi. I have kept using ruby 2.0.0 since then. To keep the site running was prior to dig deeper. – Dieglock Sep 05 '16 at 17:23

0 Answers0