为什么我必须预先捆绑exec'我的命令今天?

时间:2014-08-06 13:52:28

标签: ruby-on-rails ruby ruby-on-rails-3 rspec bundler

昨天要运行我的测试,我只需要在命令行上使用rspec

今天做完git pull and blah blah。我收到此错误gems/bundler-1.6.2/lib/bundler/runtime.rb:34:in 'block in setup': You have already activated rspec-support 3.0.3, but your Gemfile requires rspec-support 3.0.0. Prepending 'bundle exec' to your command may solve this. (Gem::LoadError)

是的bundle exec rspec可以运行并运行我的测试。这里发生了什么"引擎盖"?

1 个答案:

答案 0 :(得分:3)

我认为在某些时候rspec-support gem已在您的系统中更新。也许你做了gem update。但是你的应用程序使用的是版本3.0.0,这就是消息的原因。您可以使用bundle update更新捆绑包。通常推荐的避免版本冲突的方法是使用bundle exec

参考文献: