当我执行rake db:migrate时,会得到以下错误:
rake aborted!
Gem::LoadError: You have already activated rake 10.2.2, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this.怎么才能解决这个问题呢?
发布于 2014-04-01 17:08:30
此错误是由于某些应用程序可能指定不同版本的gems而不是您已安装的版本。
尝试使用bundle exec rake db:migrate。
使用bundle exec可以保证程序在the文件中指定的环境下运行。
发布于 2014-04-01 17:05:04
也许:
bundle exec rake db:migrate发布于 2014-04-01 17:04:28
在Gemfile中可能有其他依赖rake10.2.2的宝石,而您试图通过您的gems文件安装rake10.1.0或显式地提到它。看看你的Gemfile会有帮助。
如果您有特定的环境,您可能需要运行
bundle exec rake db:migrate 以确保您正在适当地运行它。
https://stackoverflow.com/questions/22792258
复制相似问题