[英]Two versions of rake installed = errors
I've just upgraded to ruby 1.9.3 and rails 3.2.2. 我刚刚升级到ruby 1.9.3和rails 3.2.2。 I'm trying to create this application: 我正在尝试创建此应用程序:
rails new myapp -m https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-mongoid-omniauth-template.rb -T -O
In the end of the installation it gives me the error: 在安装结束时它给我错误:
The template [https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-mongoid-omniauth-template.rb] could not be loaded. Error: You have already activated rake 0.9.2, but your Gemfile requires rake 0.9.2.2. Using bundle exec may solve this.
If i do RVM gem list or gem list I get two versions of rake: 如果我做RVM宝石列表或宝石列表我得到两个版本的rake:
rake (0.9.2.2, 0.9.2)
How do I tell RVM or whatever it is I have to tell, to use ONLY the latest? 我如何告诉RVM或其他什么我必须告诉,只使用最新的?
您应该在捆绑包的上下文中运行它。
bundle exec rails new myapp -m https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-mongoid-omniauth-template.rb -T -O
Be explicit in your Gemfile
about the version that you want. 在Gemfile
明确说明您想要的版本。
gem "rake", "0.9.2"
Update your Gemfile.lock
with: 使用以下命令更新Gemfile.lock
:
$ bundle update
Remove the version you don't want. 删除您不想要的版本。
$ gem uninstall rake -v 0.9.2.2
You can reverse these numbers depending on which gem you actually want to use. 您可以根据您实际想要使用的gem来反转这些数字。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.