0

This is the error I get when I run db:migrate.

rake db:migrate rake aborted! You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.9.2. Using bundle exec may solve this.

I then run bundle exec rake 0.9.2 and this is what I get

    'rake aborted!dlopen(/Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2 0.2.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle
  Reason: image not found - /Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle'

1 Answers1

0

You may need to install the correct MYSQL2 gem. In you Gemfile, make sure you included mysql2

gem 'mysql2'

Then rebundle and try

bundle exec rake db:migrate
Ben Miller
  • 1,464
  • 12
  • 13
  • I tried running that and got rake aborted! dlopen(/Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle, 9): Library not loaded: libmysqlclient.18.dylib Referenced from: /Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle Reason: image not found - /Users/connorphillips/.rvm/gems/ruby-1.9.3-p194/gems/mysql2-0.2.11/lib/mysql2/mysql2.bundle – Connor Phillips Sep 26 '12 at 02:12
  • Do you have the mysql libraries installed locally? Can you do "gem install mysql2" Based on the error messages, it appears that the binary files that the gem relies on are not being found. – Ben Miller Sep 26 '12 at 13:17