![](/img/trans.png)
[英]You have already activated rake 0.8.7, but your Gemfile requires rake 0.9.2. Consider using bundle exec.
[英]rake 0.9.2 isn't recognized in bundle exec
这是我运行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'
您可能需要安装正确的MYSQL2 gem。 在您的Gemfile中,确保包含mysql2
gem 'mysql2'
然后重新捆绑并尝试
bundle exec rake db:migrate
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.