昨天运行测试,我只需要在命令行上输入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
可以运行并运行我的测试。 “引擎盖下”发生了什么?
我想在某些时候rspec-support
gem在您的系统中已更新。也许您做了一个gem update
。但是,您的应用使用的是3.0.0版,这是出现此消息的原因。您可以使用bundle update
更新套件。通常,建议避免版本冲突的方法是使用bundle exec
。
参考: