Incorrect MySQL client library version
Closed this issue · 5 comments
I've installed mongify
and tried to run mongify check database.config
for MySQL.
It told me to install activerecord-mysql-adapter
which I did by running gem install activerecord-mysql-adapter
.
Now when I run mongify check database.config
, I get the following error:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require': Incorrect MySQL client library version! This gem was compiled for 5.1.71 but the client library is 5.6.24. (RuntimeError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in
block in require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in load_dependency' from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in
require'
from /Library/Ruby/Gems/2.0.0/gems/mysql-2.9.1/lib/mysql.rb:6:in rescue in <top (required)>' from /Library/Ruby/Gems/2.0.0/gems/mysql-2.9.1/lib/mysql.rb:2:in
<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in block in require' from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in
load_dependency'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in require' from /Library/Ruby/Gems/2.0.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/mysql_adapter.rb:6:in
<top (required)>'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require' from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in
require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in block in require' from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:236:in
load_dependency'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-3.2.22/lib/active_support/dependencies.rb:251:in require' from /Library/Ruby/Gems/2.0.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in
resolve_hash_connection'
from /Library/Ruby/Gems/2.0.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:29:in spec' from /Library/Ruby/Gems/2.0.0/gems/activerecord-3.2.22/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in
establish_connection'
from /Library/Ruby/Gems/2.0.0/gems/mongify-1.2.4/lib/mongify/database/sql_connection.rb:40:in setup_connection_adapter' from /Library/Ruby/Gems/2.0.0/gems/mongify-1.2.4/lib/mongify/database/sql_connection.rb:56:in
has_connection?'
from /Library/Ruby/Gems/2.0.0/gems/mongify-1.2.4/lib/mongify/cli/command/worker.rb:95:in check_sql_connection' from /Library/Ruby/Gems/2.0.0/gems/mongify-1.2.4/lib/mongify/cli/command/worker.rb:64:in
execute'
from /Library/Ruby/Gems/2.0.0/gems/mongify-1.2.4/lib/mongify/cli/application.rb:28:in execute!' from /Library/Ruby/Gems/2.0.0/gems/mongify-1.2.4/bin/mongify:15:in
<top (required)>'
from /usr/bin/mongify:23:in load' from /usr/bin/mongify:23:in
I've tried running gem uninstall mysql2
and then gem install mysql2
but I still get the same error. Any light?
Give this a try: https://gist.github.com/roolo/5006111 ?
I tried, no luck, same error.
I feel it's not doing anything, even when I run gem uninstall mysql2
and gem uninstall activerecord-mysql-adapter
, it gives me the same error. Shouldn't it tell me I have no adapter?
BTW, all with sudo
. Should I be in a specific directory?
@samin, I'm not sure, this is a mysql2 gem issue, not a Mongify specific issue. I did however notice that you're using the built in OSX ruby, which is known to have issues. I'd recommend installing RBENV and reinstalling ruby. I'd also recommend installing RBENV via homebrew. Also via brew you can reinstall mysql client and everything should work out better... This is just a guess though...
Oh, found this link: http://www.createdbypete.com/articles/ruby-on-rails-development-setup-for-mac-osx/
Does a better job walking you through the steps :)