【问题标题】:autotest not working on Windows 7 32 bit自动测试不适用于 Windows 7 32 位
【发布时间】:2011-07-15 04:53:12
【问题描述】:

我正在阅读 Michael Hartl 的 Rails 教程,但没有任何运气可以让自动测试正常工作。

当我运行“自动测试”命令时,我在终端中得到以下输出:

C:\Sites\rails_projects\sample_app>自动测试 加载自动测试/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' 捆绑器:找不到命令: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”

gem 'rails', '3.0.7' gem 'sqlite3-ruby', '1.2.5', :require => 'sqlite3'

组:开发做 宝石'rspec-rails','2.0.1' 结束

组:测试做 宝石'rspec','2.0.1' 宝石'webrat','0.7.1' 结束

有人可以帮我解决这个问题吗?

【问题讨论】:

    标签: windows ruby-on-rails-3 autotest


    【解决方案1】:

    看起来 ZenTest 可能没有正确安装。您可以尝试gem install ZenTest,看看运行bundle exec autotest 是否得到不同的结果。如果这不起作用,可以尝试将 ZenTest 添加到您的 Gemfile。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-01-10
      • 2023-02-18
      • 1970-01-01
      • 2013-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多