RailsにMySQLを入れてrake db:create実行時のエラー解消方法
Rails 4.2.3にMySQL 5.6.27を入れてローカル環境で立ち上げようとしていますが、以下のエラーが出てrake dbができません。どうすればいいのでしょうか?
$ rake db:create
rake aborted!
LoadError: dlopen(/Users/***/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0
/extensions/x86_64-darwin-14/2.1.0-static/mysql2-0.3.19/mysql2/mysql2.bundle,
9): Library not loaded: /usr/local/opt/mysql
/lib/libmysqlclient.20.dylib
Referenced from: /Users/***/
.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions
/x86_64-darwin-14/2.1.0-static/mysql2-0.3.19/mysql2/mysql2.bundle
Reason: image not found -
/Users/swati/.rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/extensions
/x86_64-darwin-14/2.1.0-static/mysql2-0.3.19/mysql2/mysql2.bundle
/Users/swati/Documents/Kluje_git/kluje/config
/application.rb:16:in `<top (required)>'
/Users/***/Documents/rails_project/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
環境 Mac Yosemite 10.10.2