[rspec-users] can't get RSpec 2.3.1 to work in Rails 3.0.3 - uninitialized constant Rails (NameError)

Kurt ks at cissor.com
Thu Dec 30 17:37:42 EST 2010

I just installed rspec-rails 2.3.1 gem into a new Rails 3.0.3 app, ran
the rspec:install generator, but the system doesn't see any other
RSpec generators (like rspec_controller), and the server will no
longer start.

Both report this error:

/.rvm/gems/ruby-1.9.2-p0 at rails3/gems/rspec-rails-2.3.1/lib/rspec-
rails.rb:3:in `<module:Rails>': uninitialized constant Rails

Here's a clip of the file referenced by the error:

module RSpec
  module Rails
    class Railtie < ::Rails::Railtie

I've used RSpec 2.0 and 2.1 with Rails 3 before without problems.  Any
suggestions greatly appreciated..

More information about the rspec-users mailing list