私の問題/質問
リスト3.9の非常に基本的な rspec テストを実行できません。static_pages_spec が LoadError を返す原因となっている非常に基本的な何かが欠けているように感じます。誰が何がうまくいかないのか考えていますか?
エラー
E:\CSProj\RailsTutorial\sample_app>bundle exec rspec spec/request/static_pages_s pec.rb C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib /rspec /core/configuration.rb:780
load': cannot load such file -- E:/CSProj/RailsTu torial/sample_app/spec/request/static_pages_spec.rb (LoadError) from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 1.1/lib/rspec/core/configuration.rb:780:in
: C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 1.1/lib/rspec/core からの load_spec_files のブロック内/configuration.rb:780map' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 1.1/lib/rspec/core/configuration.rb:780:in
: in load_spec_files' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 1.1/lib/rspec/core/command_line.rb:22 :inrun' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 1.1/lib/rspec/core/runner.rb:69:in
run' from C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.1 1.1/lib/rspec/core/runner.rb:8:in `block in autorun '
コード
次のコードを使用しています: https://github.com/adoliver/sample_app/blob/static-pages/spec/requests/static_pages_spec.rb
require 'spec_helper'
describe "Static pages" do
describe "Home page" do
it "should have the content 'Sample App'" do
visit '/static_pages/home'
page.should have_content('Sample App')
end
end
end
私の開発環境に関するいくつかの情報
Windows 7 使用 railsInstaller Windows ネイティブ コマンド ラインを使用 チュートリアルの前の手順はうまくいきました。
E:\CSProj\RailsTutorial\sample_app>ruby -v ruby 1.9.3p125 (2012-02-16) [i386-mingw32]
E:\CSProj\RailsTutorial\sample_app>rails -v Rails 3.2.9
私のバンドル:
E:\CSProj\RailsTutorial\sample_app>bundle list バンドルに含まれる Gem:
- アクションメーラー (3.2.9)
- アクションパック (3.2.9)
- アクティブモデル (3.2.9)
- アクティブレコード (3.2.9)
- アクティブリソース (3.2.9)
- アクティブサポート (3.2.9)
- アレル (3.0.2)
- ビルダー (3.0.4)
- バンドラー (1.0.22)
- カピバラ (1.1.2)
- 子プロセス (0.3.6)
- コーヒーレール (3.2.2)
- コーヒースクリプト (2.2.0)
- コーヒースクリプトソース (1.4.0)
- diff-lcs (1.1.3)
- エルビス (2.7.0)
- execjs (1.4.0)
- ffi (1.2.0)
- ハイキング (1.2.1)
- 国際化 (0.6.1)
- 旅 (1.0.4)
- jquery レール (2.0.2)
- json (1.7.5)
- libwebsocket (0.1.6.1)
- メール (2.4.4)
- MIME タイプ (1.19)
- multi_json (1.3.7)
- ノコギリ (1.5.5)
- ポリグロット (0.3.3)
- ラック (1.4.1)
- ラックキャッシュ (1.2)
- ラック-ssl (1.3.2)
- ラックテスト (0.6.2)
- レール (3.2.9)
- レールティー (3.2.9)
- レーキ (10.0.2)
- rdoc (3.12)
- rspec (2.11.0)
- rspec-コア (2.11.1)
- rspec-expectations (2.11.3)
- rspec-mocks (2.11.3)
- rspec レール (2.11.0)
- ルビージップ (0.9.9)
- サス(3.2.3)
- サスレール(3.2.5)
- セレン-webdriver (2.26.0)
- スプロケット (2.2.1)
- sqlite3 (1.3.5)
- トール (0.16.0)
- 傾き (1.3.3)
- こずえ (1.4.12)
- ツズインフォ (0.3.35)
- 醜い (1.2.3)
- ウェブソケット (1.0.3)
- xpath (0.1.4)