I'm struggeling with RSpec, I just can't get RSpec to work in my Ruby project. Not even in the easy example provided in the "Get Started Now" section of the official homepage of RSpec: http://rspec.info/
So I take the code from the official example and create bowling.rb and bowling_spec.rb. When i try to run rspec from the console with:
rspec bowling_spec.rb --format nested
I get this output:
require': no such file to load -- bowling (LoadError)
from C:/.../Ruby192/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/.../bowling_spec.rb:2:in `<top (required)>'
from C:/.../Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load'
from C:/.../Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `block in load_spec_files'
from C:/.../Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `map'
from C:/.../Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/configuration.rb:419:in `load_spec_files'
from C:/.../Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/command_line.rb:18:in `run'
from C:/.../Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:80:in `run_in_process'
from C:/.../Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:69:in `run'
from C:/.../Ruby192/lib/ruby/gems/1.9.1/gems/rspec-core-2.6.4/lib/rspec/core/runner.rb:11:in `block in autorun'
I tried to run RSpec on my own project with Netbans 7.0.1 as well as with Aptanda Studio 3. I always get this same error. The gem list show the following rspec gems:
- rspec (2.6.0)
- rspec-core (2.6.4)
- rspec-expectations (2.6.0)
- rspec-mocks (2.6.0)
- rspec-rails (2.6.1)
- rspec-rails-controller (0.1.2)
Can anybody help me with this?
require 'bowling'(orrequire 'bowling.rb') to load the file? If so, you might want to userequire './path/to/bowling.rb'or add yourlibdirectory to your load path.