[rspec-users] config.gem/rspec-rails/rspec bug (#577)

David Chelimsky dchelimsky at gmail.com
Tue Oct 21 14:51:42 EDT 2008


Hey all,

Just a heads up about a bug related to configuring the rspec gems in
your rails 2.1.1 projects:

  http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/577

Apparently, if you config.gem both rspec and rspec-rails 1.1.9 w/
rspec first, you'll get an error:

# DON'T DO THIS:
config.gem 'rspec', :lib => 'spec', :version => '1.1.9'
config.gem 'rspec-rails', :lib => 'spec/rails', :version => '1.1.9'

The workaround is to either reverse these lines:

# OK
config.gem 'rspec-rails', :lib => 'spec/rails', :version => '1.1.9'
config.gem 'rspec', :lib => 'spec', :version => '1.1.9'

or just require rspec-rails if you're using rubygems >= 1.2 (since
installing rspec-rails will, by default, install rspec)

# OK
config.gem 'rspec-rails', :lib => 'spec/rails', :version => '1.1.9'

Keep your eye on the ticket
(http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/577) to
see when this is resolved.

Cheers,
David


More information about the rspec-users mailing list