我刚刚升级到ruby 1.9.3和rails 3.2.2。我正在尝试创建此应用程序:
rails new myapp -m https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-mongoid-omniauth-template.rb -T -O在安装结束时,它给出了一个错误:
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.如果我执行RVM gem list或gem list,我会得到两个版本的rake:
rake (0.9.2.2, 0.9.2)我如何告诉RVM或我必须告诉它的任何东西,只使用最新的?
发布于 2012-03-19 22:20:06
在你的Gemfile中明确说明你想要的版本。
gem "rake", "0.9.2"
使用以下内容更新您的Gemfile.lock:
$ bundle update
删除你不想要的版本。
$ gem uninstall rake -v 0.9.2.2
您可以根据您实际想要使用的gem来反转这些数字。
发布于 2012-03-19 22:24:36
您应该在捆绑包的上下文中运行它。
bundle exec rails new myapp -m https://github.com/RailsApps/rails3-application-templates/raw/master/rails3-mongoid-omniauth-template.rb -T -Ohttps://stackoverflow.com/questions/9771357
复制相似问题