在Rails 3中使用Rspec2进行自动测试找不到二进制文件 [英] Autotest with Rspec2 in Rails 3 Can't Find Binaries
问题描述
将项目移到Rails 3之后,我试图恢复自动测试并运行.升级到rspec 2.0.0.beta.22后,我似乎无法运行自动测试.我得到以下信息:
I'm trying to get autotest back up and running after moving my project to rails 3. After upgrading to rspec 2.0.0.beta.22, I can't seem to run autotest. I get the following:
bundler: command not found: c:/Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.0.0.beta.22/bin/rspec
即使二进制文件实际上确实存在于该位置.
even though the binary does in fact exist in that location.
这是我的Gemfile内容:
Here is my Gemfile contents:
group :development do
gem 'webrat'
gem 'rspec-rails', '>=2.0.0.beta.22'
gem 'factory_girl_rails', '1.0'
gem 'autotest'
end
group :test do
gem 'webrat'
gem 'rspec-rails', '>=2.0.0.beta.22'
gem 'factory_girl_rails', '1.0'
gem 'autotest'
end
并且我安装了以下宝石(以及其他宝石):
and I have the following gems installed (among others):
- 自动测试(4.3.2)
- autotest-growl(0.2.5)
- rspec(2.0.0.beta22)
- rspec-core(2.0.0.beta22)
- rspec-expectations(2.0.0.beta22)
- rspec-mocks(2.0.0.beta22)
- rspec-rails(2.0.0.beta22)
- ZenTest(4.4.0)
有什么想法吗?
推荐答案
这是我解决问题的方法:
This is how I remedied the issue:
我卸载了所有测试gem(rspec,factory_girl,webrat等).然后,我升级到rspec 2.0.1,卸载了ZenTest(支持直接自动测试).所有这些安装都是在捆绑器之外完成的.
I uninstalled all testing gems (rspec, factory_girl, webrat, etc). I then upgraded to rspec 2.0.1, uninstalled ZenTest (in favor of straight autotest). All of these installations were done outside of the bundler.
我有以下gem设置:
autotest (4.4.1)
autotest-growl (0.2.6)
factory_girl (1.3.2)
factory_girl_rails (1.0)
rspec (2.0.1)
rspec-core (2.0.1)
rspec-expectations (2.0.1)
rspec-mocks (2.0.1)
rspec-rails (2.0.1)
webrat (0.7.1)
我在Gemfile中使用了以下内容.
I used the following in the Gemfile.
group :development, :test do
gem 'rspec', '>=2.0.1'
gem 'rspec-rails', '>=2.0.1'
gem 'webrat'
gem 'factory_girl_rails', '1.0'
end
这篇关于在Rails 3中使用Rspec2进行自动测试找不到二进制文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!