0

I am picking up a project I have not worked on for a year. When I try to run rspec I get this error message

   /home/andreas/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require': 
cannot load such file -- rspec/rails/extensions/active_record/base (LoadError)

I get this message after running

bundle exec rspec

And it comes after the migrations have been executed

andreas@ofelia ~/w/sl2> rails -v
Rails 4.1.9
andreas@ofelia ~/w/sl2> rspec -v
3.5.4
andreas@ofelia ~/w/sl2> ruby -v
ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]


andreas@ofelia ~/w/sl2> which gem activesupport
/home/andreas/.rvm/rubies/ruby-2.1.1/bin/gem

andreas@ofelia ~/w/sl2> which gem active_record
/home/andreas/.rvm/rubies/ruby-2.1.1/bin/gem

andreas@ofelia ~/w/sl2> gem list | grep activerecord
activerecord (4.1.9, 4.1.1, 4.1.0, 4.0.3, 4.0.0, 3.0.10)
activerecord-deprecated_finders (1.0.3)

Solution

It was a rspec version problem. I didn't remember that the tests was made with rspec 2. Hope someone can learn something form this

Andreas Lyngstad
  • 4,887
  • 2
  • 36
  • 69

0 Answers0