为什么在测试 Rails 应用程序时找不到 Autotest?
我是 Rails 和测试驱动开发的新手,在尝试从命令行运行自动测试时遇到此错误:
APL-IM23AGW:sample_app 220040168$ autotest
/Users/220040168/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find autotest (>= 0) amongst [actionmailer-3.1.1, actionpack-3.1.1, activemodel-3.1.1, activerecord-3.1.1, activeresource-3.1.1, activesupport-3.1.1, addressable-2.2.6, ansi-1.3.0, arel-2.2.1, builder-3.0.0, bundler-1.0.21, coffee-rails-3.1.1, coffee-script-2.2.0, coffee-script-source-1.1.2, diff-lcs-1.1.3, erubis-2.7.0, execjs-1.2.9, heroku-2.11.0, hike-1.2.1, i18n-0.6.0, jquery-rails-1.0.16, json-1.6.1, launchy-2.0.5, mail-2.3.0, mime-types-1.16, multi_json-1.0.3, nokogiri-1.5.0, polyglot-0.3.2, rack-1.3.5, rack-cache-1.1, rack-mount-0.8.3, rack-ssl-1.3.2, rack-test-0.6.1, rails-3.1.1, railties-3.1.1, rake-0.9.2.2, rake-0.9.2, rdoc-3.11, rest-client-1.6.7, rspec-2.0.1, rspec-core-2.0.1, rspec-expectations-2.0.1, rspec-mocks-2.0.1, rspec-rails-2.0.1, rubyzip-0.9.4, sass-3.1.10, sass-rails-3.1.4, sprockets-2.0.3, sqlite3-1.3.4, sqlite3-ruby-1.3.1, sqlite3-ruby-1.2.5, term-ansicolor-1.0.7, thor-0.14.6, tilt-1.3.3, treetop-1.4.10, turn-0.8.3, tzinfo-0.3.30, uglifier-1.0.4, webrat-0.7.1] (Gem::LoadError)
from /Users/220040168/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/220040168/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
from /Users/220040168/.rvm/rubies/ruby-1.9.2-p290/bin/autotest:18:in `<main>'
我该如何解决这个问题?
I am new to Rails and test-driven development, and am getting this error when trying to run Autotest from the command line:
APL-IM23AGW:sample_app 220040168$ autotest
/Users/220040168/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find autotest (>= 0) amongst [actionmailer-3.1.1, actionpack-3.1.1, activemodel-3.1.1, activerecord-3.1.1, activeresource-3.1.1, activesupport-3.1.1, addressable-2.2.6, ansi-1.3.0, arel-2.2.1, builder-3.0.0, bundler-1.0.21, coffee-rails-3.1.1, coffee-script-2.2.0, coffee-script-source-1.1.2, diff-lcs-1.1.3, erubis-2.7.0, execjs-1.2.9, heroku-2.11.0, hike-1.2.1, i18n-0.6.0, jquery-rails-1.0.16, json-1.6.1, launchy-2.0.5, mail-2.3.0, mime-types-1.16, multi_json-1.0.3, nokogiri-1.5.0, polyglot-0.3.2, rack-1.3.5, rack-cache-1.1, rack-mount-0.8.3, rack-ssl-1.3.2, rack-test-0.6.1, rails-3.1.1, railties-3.1.1, rake-0.9.2.2, rake-0.9.2, rdoc-3.11, rest-client-1.6.7, rspec-2.0.1, rspec-core-2.0.1, rspec-expectations-2.0.1, rspec-mocks-2.0.1, rspec-rails-2.0.1, rubyzip-0.9.4, sass-3.1.10, sass-rails-3.1.4, sprockets-2.0.3, sqlite3-1.3.4, sqlite3-ruby-1.3.1, sqlite3-ruby-1.2.5, term-ansicolor-1.0.7, thor-0.14.6, tilt-1.3.3, treetop-1.4.10, turn-0.8.3, tzinfo-0.3.30, uglifier-1.0.4, webrat-0.7.1] (Gem::LoadError)
from /Users/220040168/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /Users/220040168/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems.rb:1210:in `gem'
from /Users/220040168/.rvm/rubies/ruby-1.9.2-p290/bin/autotest:18:in `<main>'
How can I solve this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保自动测试位于您的
Gemfile
中:Make sure autotest is in your
Gemfile
: