0

这是我在运行 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.

然后我运行 bundle exec rake 0.9.2 这就是我得到的

    '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'
4

1 回答 1

0

您可能需要安装正确的 MYSQL2 gem。在 Gemfile 中,确保包含 mysql2

gem 'mysql2'

然后重新捆绑并尝试

bundle exec rake db:migrate
于 2012-09-25T19:35:30.660 回答