Reputation: 1
I tried typing in rake db:migrate to create a migration, but my rake is aborted and giving me this statement. Could you please explain why this is happening?
Muhammeds-MacBook-Pro:simple_cms muhammedz786$ rake db:migrate
rake aborted!
dlopen(/Users/muhammedz786/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/mysql2-0.3.14/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib
Referenced from: /Users/muhammedz786/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/mysql2-0.3.14/mysql2/mysql2.bundle
Reason: image not found - /Users/muhammedz786/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/extensions/x86_64-darwin-13/2.1.0-static/mysql2-0.3.14/mysql2/mysql2.bundle
/Users/muhammedz786/rails_application/simple_cms/config/application.rb:7:in `<top (required)>'
/Users/muhammedz786/rails_application/simple_cms/Rakefile:4:in `<top (required)>'
(See full trace by running task with --trace)
Upvotes: 0
Views: 76
Reputation: 3298
From your question I see you are on a Macintosh. Therefore, try the following:
mysql_install_db
in the terminalmysql.server start
in the terminalUpvotes: 1
Reputation: 911
your mysql package not install properly for that give command
sudo apt-get install mysql-server mysql-common mysql-client
if this is not work install this
sudo apt-get install libmysql-ruby libmysqlclient-dev
Upvotes: 1