在RubyMine中运行规范时出现rake版本控制错误;我可以手动编辑Gemfile.lock吗 [英] error with rake versioning when running specs in RubyMine; can I manually edit Gemfile.lock
本文介绍了在RubyMine中运行规范时出现rake版本控制错误;我可以手动编辑Gemfile.lock吗的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开始遇到此错误,并想解决它:
I started getting this error and would like a way to fix it:
You have already activated rake 10.1.1, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this.
我正在RubyMine中运行它。我可以在Gemfile.lock中看到它指定了10.1.0。我可以手动将我的Gemfile.lock更新到10.1.1吗?
I am running this from within RubyMine. I can see in my Gemfile.lock where it specifies 10.1.0. Can I just manually update my Gemfile.lock to 10.1.1?
如果我这样做:
$gem list
....
rake (10.1.1, 10.1.0, 10.0.4, 0.9.2.2)
所以我不确定为什么它不只适用于10.1.0吗?
So I'm not sure why it isn't just working with 10.1.0?
这是RubyMine的全部输出:
Here's the full output from RubyMine:
/Users/jt/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/jt/.rvm/gems/ruby-1.9.3-p448/bin/rake spec
Testing started at 3:15 PM ...
rake aborted!
You have already activated rake 10.1.1, but your Gemfile requires rake 10.1.0. Using bundle exec may solve this.
/Users/jt/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:33:in `block in setup'
/Users/jt/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/runtime.rb:19:in `setup'
/Users/jt/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler.rb:120:in `setup'
/Users/jt/.rvm/gems/ruby-1.9.3-p448/gems/bundler-1.3.5/lib/bundler/setup.rb:17:in `<top (required)>'
/Users/jt/repos/app/config/boot.rb:6:in `<top (required)>'
/Users/jt/repos/app/config/application.rb:1:in `<top (required)>'
/Users/jt/repos/app/Rakefile:5:in `<top (required)>'
-e:1:in `load'
-e:1:in `<main>'
(See full trace by running task with --trace)
Process finished with exit code 1
推荐答案
您可以删除
Gemfile.lock file
和exec
bundle update
这篇关于在RubyMine中运行规范时出现rake版本控制错误;我可以手动编辑Gemfile.lock吗的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文