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

后端 未结 3 1101
醉酒成梦
醉酒成梦 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 02:03

    Found this thread while debugging the same symptoms. Here is another reason for the error: I had run

    rspec --init
    

    but had failed to run

    rails generate rspec:install
    

    Doing the latter fixed the problem.

提交回复
热议问题