When trying to run rspec, I get “uninitialized constant ActiveModel”

后端 未结 3 1103
醉酒成梦
醉酒成梦 2021-01-28 01:19

When I run rspec spec I get the following:

/usr/local/lib/ruby/gems/1.9.1/gems/rspec-rails-2.7.0/lib/rspec/rails/extensions/active_record/base.rb:26:in `         


        
3条回答
  •  深忆病人
    2021-01-28 01:50

    Why are you running rspec spec? The typical thing to run is rake spec.

    Try bundle exec rspec spec or bundle exec rake spec.

    If that doesn't work, try to see if something is wrong with the rest of your environment -- try bundle exec rails console and bundle exec rails server

    Another thing to check, is there anything odd in .rspec in your project file, or ~/.rspec?

提交回复
热议问题