Can't get the "mysql" gem to work after installing Yosemite
I installed Yosemite last night and found that mysql was uninstalled in the process. I downloaded the .dmg file from the MySQL website, reinstalled it, ran it, no problem.
However, when running 'rake db: migrate' to restore the database in the Sinatra project I am working on, I got this:
sh-3.2$ rake db:migrate
rake aborted!
LoadError: dlopen(/usr/local/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/mysql-2.9.1/mysql/mysql_api.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /usr/local/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/mysql-2.9.1/mysql/mysql_api.bundle
Reason: image not found - /usr/local/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/mysql-2.9.1/mysql/mysql_api.bundle
/Users/identry/Documents/ios/projects/GagnonPhoto/app.rb:1:in `<top (required)>'
/Users/identry/Documents/ios/projects/GagnonPhoto/Rakefile:1:in `<top (required)>'
LoadError: cannot load such file -- mysql/2.1/mysql_api
/Users/identry/Documents/ios/projects/GagnonPhoto/app.rb:1:in `<top (required)>'
/Users/identry/Documents/ios/projects/GagnonPhoto/Rakefile:1:in `<top (required)>'
LoadError: cannot load such file -- mysql
/Users/identry/Documents/ios/projects/GagnonPhoto/app.rb:1:in `<top (required)>'
/Users/identry/Documents/ios/projects/GagnonPhoto/Rakefile:1:in `<top (required)>'
(See full trace by running task with --trace)
I get the same error if I start irb and type: require 'mysql'.
It seems like mysql install is missing something, but I'm not sure what. Any hints are greatly appreciated.
+3
source to share
No one has answered this question yet
Check out similar questions: