0
votes

I'm trying to start a second rails project, and for my firstone, rspec worked fine. I copied over the Gemfile to have the same gems, and I have the spec/requests directory in my project file. However, I get this error when I try to execute

C:\Sites\rails_projects\friendapp\app\views\static_pages>bundle exec rspec spec/ requests C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/rspec-core-2.11.1/lib/rspec /core/configuration.rb:780:in load': cannot load such file -- C:/Sites/rails_pr ojects/friendapp/app/views/static_pages/spec/requests (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:inblock 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/configuration.rb:780:in map' 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:inload_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: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:69: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:8:in `block in autorun'

Any clues? Thanks!

1
did you run bundle install in your new project? - davegson

1 Answers

1
votes

It looks like you are not executing bundle exec from the root of the app, but rather from app\views\static_pages:

C:\Sites\rails_projects\friendapp\app\views\static_pages>

The error message says that the file does not exist from that location (static_pages):

C:/Sites/rails_projects/friendapp/app/views/static_pages/spec/requests

Change to the root dir and try again

C:\Sites\rails_projects\friendapp\>bundle exec rspec spec/requests