自动测试无法在 Windows 7 32 位上运行
我正在阅读 Michael Hartl 的 Rails 教程,但没有运气让自动测试正常工作。
当我运行“autotest”命令时,我在终端中得到以下输出:
C:\Sites\rails_projects\sample_app>自动测试 加载自动测试/rails_rspec2
<小时>←[2J←[fbundle exec C:\RailsInstaller\Ruby1.8.7\bin\ruby -SC:/RailsInstaller/Rub y1.8.7/lib/ruby/gems/1.8/gems/rspec-core-2.0.1/bin/rspec --autotest 'C:/Sites/ra ils_projects/sample_app/spec/controllers/pages_controller_spec.rb' 捆绑程序:找不到命令:C:\RailsInstaller\Ruby1.8.7\bin\ruby 使用
bundle install
安装缺少的 gem 二进制文件 通知发送成功 通知发送成功
然后它就停止了,我必须 cntrl+c 才能摆脱它。
当我尝试运行“bundle exec autotest”时,我得到以下输出:
C:\Sites\rails_projects\sample_app>bundle exec 自动测试 C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/ru bygems_integration.rb:143:in `gem': ZenTest 不是捆绑包的一部分。将其添加到 宝石文件。 (宝石::加载错误) 来自 C:/RailsInstaller/Ruby1.8.7/bin/autotest:18
我的 .autotest 文件中有以下内容:
需要“自动测试/咆哮”
,我的 gemfile 如下所示:
来源“http://rubygems.org”
宝石“导轨”,“3.0.7” gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'
组:开发做 宝石“rspec-rails”,“2.0.1” 结束
组:测试做 宝石“rspec”,“2.0.1” 宝石“webrat”,“0.7.1” 结束
有人可以帮我解决这个问题吗
I'm going through the Rails Tutorial by Michael Hartl and am not having any luck getting autotest working.
When I run the "autotest" command I get the following output in my terminal:
C:\Sites\rails_projects\sample_app>autotest
loading autotest/rails_rspec2←[2J←[fbundle exec C:\RailsInstaller\Ruby1.8.7\bin\ruby -S C:/RailsInstaller/Rub
y1.8.7/lib/ruby/gems/1.8/gems/rspec-core-2.0.1/bin/rspec --autotest 'C:/Sites/ra
ils_projects/sample_app/spec/controllers/pages_controller_spec.rb'
bundler: command not found: C:\RailsInstaller\Ruby1.8.7\bin\ruby
Install missing gem binaries withbundle install
Notification sent successfully
Notification sent successfully
Then it just stalls and I have to cntrl+c to get out of it.
When I try running a "bundle exec autotest" i get the following output:
C:\Sites\rails_projects\sample_app>bundle exec autotest
C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/bundler-1.0.14/lib/bundler/ru
bygems_integration.rb:143:in `gem': ZenTest is not part of the bundle. Add it to
Gemfile. (Gem::LoadError)
from C:/RailsInstaller/Ruby1.8.7/bin/autotest:18
I have the following content in my .autotest file:
require 'autotest/growl'
and my gemfile looks like this:
source 'http://rubygems.org'
gem 'rails', '3.0.7'
gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'group :development do
gem 'rspec-rails', '2.0.1'
endgroup :test do
gem 'rspec', '2.0.1'
gem 'webrat', '0.7.1'
end
Can someone please help me with this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来 ZenTest 可能没有正确安装。您可以尝试
gem install ZenTest
并查看运行bundle exec autotest
是否得到不同的结果。如果这不起作用,也许可以尝试将 ZenTest 添加到您的 Gemfile 中。It looks like ZenTest may not have installed correctly. You could try
gem install ZenTest
and see if you get a different result runningbundle exec autotest
. If that doesn't work, maybe try adding ZenTest to your Gemfile.