我在 Ubuntu (EC2) 上运行 Rails 3 应用程序,我将 rake 锁定在 0.8.7 版本,当我执行 rake db:migrate 时,我得到了通常的结果:
You have already activated rake 0.9.2.2, but your Gemfile requires rake 0.8.7. Using bundle exec may solve this.
但是,当我执行 bundle exec rake db:migrate 时,我得到了相同的响应..
??
最佳答案
您可以尝试以下几件事:
将 Ruby 升级到 1.9.3,这将提供 Rake 0.9.2.2
将此添加到您的 Gemfile
gem 'rake' , '>= 0.9.2'
并再次运行bundle update
。最坏的情况,删除您的 Gemfile.lock 并使用
重新生成它bundle install
关于ruby - Bundle exec rake db :migrate does not work (and neither does rake db:migrate), Ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9849323/