Error when trying to run rspec: `require': cannot load such file -- rails_helper (LoadError)

There is some problem with rspec V3. But in your case you are using V2.

change

require 'rails_helper'

to

require 'spec_helper'

Other description find here https://teamtreehouse.com/forum/problem-with-rspec

For V3 :

If someone using rspec V3 then similar error occurs when generator not run. So before trying anything run generator.

rails generate rspec:install

If you are getting a huge list of warning on your console. Then you need to remove --warnings from .rspec file.


I actually just had this error on rails 4 with rspec 3, but in my case I forgot to run the generator:

rails generate rspec:install

Also I had to remove warnings from .rspec, as stated by one of rpsec developers


For me, the problem was due to a different "rspec-support" version loaded and activated. I solved by prepending a "bundle exec":

bundle exec rspec