Search code examples
ruby-on-railsrubyrspecspork

spork not installed correctly on rails


I write my first rails project. So far I've followed some tutorial and had my unit tests runing with rspec.

Now I tried to install spork using several other tutorials and neither spork nor the unit tests work.

When I activate spork it is up but then says:

no such file to load -- rspec/rails.

C:/RailsInstaller/Ruby1.8.7/lib/ruby/gems/1.8/gems/activesupport-3.0.9/lib/activ
e_support/dependencies.rb:239:in `require': no such file to load -- rspec/rails
(LoadError)

Here is my gem file:

source 'http://rubygems.org'

gem 'rails', '3.0.9'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', '1.3.2', :require => 'sqlite3'

group :development do 
gem 'rspec-rails', '2.5.0' 
end

group :test do 
gem 'rspec', '2.5.0' 
gem 'webrat', '0.7.1'
gem 'spork', '0.8.5' 
gem 'win32-process'
end

any idea? please be specific as it's my first project.


Solution

  • Your rspec-rails gem is not currently accessible by the test environment. Change your rspec-rails block to this:

    group :development, :test do
      gem 'rspec-rails', '2.5.0'
    end