1

ターミナルでコマンド「bundleexecautotest」を実行しようとしています。'bundle exec rspec spec /'を使用すると、RSpecを機能させることができますが、自動テスト(最初のコマンド)を実行できません。残念ながら、次のエラーが発生します。

Trenton-Scotts-MacBook-Air:sample_app TTS$ bundle exec autotestloading autotest/rails_rspec2
/Users/TTS/Documents/Rails/sample_app/.autotest:1:in `require': no such file to load -- autotest/growl (LoadError)
    from /Users/TTS/Documents/Rails/sample_app/.autotest:1:in `<top (required)>'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/ZenTest-4.4.2/lib/autotest.rb:305:in `load'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/ZenTest-4.4.2/lib/autotest.rb:305:in `block in initialize'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/ZenTest-4.4.2/lib/autotest.rb:304:in `each'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/ZenTest-4.4.2/lib/autotest.rb:304:in `initialize'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-core-2.4.0/lib/autotest/rspec2.rb:10:in `initialize'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/rspec-rails-2.4.1/lib/autotest/rails_rspec2.rb:31:in `initialize'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/ZenTest-4.4.2/lib/autotest.rb:236:in `new'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/ZenTest-4.4.2/lib/autotest.rb:236:in `run'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/gems/ZenTest-4.4.2/bin/autotest:7:in `<top (required)>'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/bin/autotest:19:in `load'
    from /Users/TTS/.rvm/gems/ruby-1.9.2-p136/bin/autotest:19:in `<main>'

Railsプロジェクトフォルダーの.autotestに2行あります。

require 'autotest/growl'
require 'autotest/fsevent'

autotest-growlとautotest-fseventのgemをインストールしました。私のGemfileは次のようになります。

source 'http://rubygems.org'

gem 'rails', '3.0.3'
gem 'sqlite3-ruby', :require => 'sqlite3'

group :development do
  gem 'autotest'
  gem 'rspec-rails', '2.4.1'
end

group :test do
  gem 'rspec', '2.4.0'
  gem 'webrat', '0.7.1'
end

これを修正する方法について何か考えはありますか?

4

2 に答える 2

3

修正しました!正しいコマンドは、「bundleexecautotest」ではなく「autotest」です。'rspecspec/'も機能します。

于 2011-02-03T01:14:28.733 に答える
0

トレントン私は、すべてのgem実行可能ファイルを/ binの下に置き、 Gemfilebundle install --binstubsのgrowlを含めてその問題を解決しました。autotestgemが実行後に実行可能ファイルを作成しなかった理由がわかりません。その実行可能ファイルはどのディレクトリにありますか?gem install autotest

于 2012-01-22T20:25:33.167 に答える