Confused with rake error in Rails 3

杀马特。学长 韩版系。学妹 提交于 2019-12-18 13:13:53

问题


Noob trying to decipher what to do with the following error:

rake aborted! You have already activated rake 0.9.1, but your Gemfile requires rake 0.8.7. Consider using bundle exec.

Any help is greatly appreciated.


回答1:


Try running bundle exec rake instead of just rake. This error will occur when you have a newer version of rake installed on your computer than the one specified in your Gemfile (or Gemfile.lock)




回答2:


This worked for me:

  1. Add rake 0.8.7 to your Gemfile

    gem 'rake', '0.8.7'
    
  2. remove rake 0.9.1 by doing

    gem uninstall rake -v=0.9.1
    
  3. run bundle update on the terminal

    bundle update
    

Hope that helps. Thanks

Antonio




回答3:


Do you have...

gem 'rake', '0.8.7'

... in your Gemfile?

If so, remove it.




回答4:


This error is a result of having rake 0.9.1 installed on your system but your rake file specifying 0.8.7. You can do bundle exec rake to use rake 0.8.7 or change the version of rake that you need.




回答5:


bundle update rake

works fine for me :D



来源:https://stackoverflow.com/questions/6205377/confused-with-rake-error-in-rails-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!