运行迁移时Rails迁移错误?

6 ruby rake ruby-on-rails

当我这样做时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.
Run Code Online (Sandbox Code Playgroud)

怎么解决这个?

neo*_*ode 3

此错误是由于某些应用程序可能指定与您已安装的版本不同的 gems 版本。

尝试使用bundle exec rake db:migrate.

usingbundle exec保证程序在 gemfile 中指定的环境中运行。