0

Michael Hartl の ROR チュートリアルに従って、セクション 3.2 テストの指示に従った後、この奇妙なエラーが発生しました。次のコマンドを実行します: bundle exec rspec spec/requests/static_pages_spec.rb エラーが発生します:

bundle exec rspec spec/requests/static_pages_spec.rb /Users/name/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780: in load': no such file to load -- /Users/name/Desktop/ROR/sample-app/spec/requests/spec/requests/static_pages_spec.rb (LoadError) from /Users/name/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:inblock in load_spec_files' from /Users/name/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:in map' from /Users/name/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/configuration.rb:780:inload_spec_files' from /Users/name/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:22:in run' from /Users/name/.rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:inrun' from /Users/name/. rvm/gems/ruby-1.9.2-p320/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:「自動実行でブロック」

任意の助けをいただければ幸いです

4

1 に答える 1

0

エラーメッセージは、/Users/name/Desktop/ROR/sample-app/* spec/requests/spec/requests/ *static_pages_spec.rbでファイルを探していることを示しています

このコマンドを実行しようとしたときに、すでに spec/requests/ ディレクトリにいますか? プロジェクトのホーム ディレクトリにいることを前提としています。すでに spec/requests/ にいる場合は、次を実行できます。

bundle exec rspec static_pages_spec.rb

于 2013-06-21T20:28:18.960 に答える