pdenlinger
pdenlinger

Reputation: 3917

Loading errors for running rspec

Am trying to run Rails 3.0 and Ruby 1.9.2 and am running Rspec 2.6.0 which I just downloaded. When I try to run Rspec, I get the following error message:

 Paul-Denlingers-MacBook-Pro:spec pdenlinger$ rspec spec
 No DRb server is running. Running in local process instead ...
 /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-     2.6.4/lib/rspec/core/configuration.rb:419:in `load':    
 no such file to load --       /Users/pdenlinger/rails3inaction/things_i_bought/bacon/spec/spec (LoadError)
from /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-   2.6.4/lib/rspec/core/configuration.rb:419:in 
`block in load_spec_files'
from /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:
 in `map'
from /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:
 in `load_spec_files'
from /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:18:
 in `run'
from /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:
 in `run_in_process'
from /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:66:
 in `rescue in run'
from /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:62:
 in `run'
from /Users/pdenlinger/.rvm/gems/ruby-1.9.2-p0@rails3tutorial/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:
  in `block in autorun'

Sorry for the code formatting problems; some of the lines just won't adjust.

What do I need to do to fix this problem?

Upvotes: 2

Views: 2241

Answers (2)

ganeshvpt
ganeshvpt

Reputation: 11

Paul-Denlingers-MacBook-Pro:spec pdenlinger$ bundle exec rspec

Upvotes: 1

fuzzyalej
fuzzyalej

Reputation: 5973

Your are telling rspec to search for the spec directory and then get all the specs there. If you are already in the spec directory, it will fail, so you have to run rspec . or get into the root directory for your app and run rspec spec from there.

Upvotes: 4

Related Questions