Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I resolve "incompatible library version" for mysql2 gem with ruby 2.3 on OS X?

I'm using ruby 2.3, and in the gemfile, I've got the mysql2 gem listed. But when I try to run rake db:migrate, I get the following:

/Users/me/.gem/ruby/2.3.0/gems/mysql2-0.4.2/lib/mysql2.rb:31:in `require': incompatible library version - /Users/me/.gem/ruby/2.3.0/gems/mysql2-0.4.2/lib/mysql2/mysql2.bundle (fatal)

I can't seem to get around this one. I've installed Mysql 5.7 with Homebrew, tried updating the bundle, uninstalling and reinstalling the mysql2 gem, all to no avail.

How can I get this resolved?

like image 973
croceldon Avatar asked Dec 30 '15 19:12

croceldon


2 Answers

I ended up solving this with gem pristine --all

like image 157
croceldon Avatar answered Nov 05 '22 09:11

croceldon


I have solved this with gem pristine mysql2 followed by spring stop.

like image 35
joe Avatar answered Nov 05 '22 11:11

joe