3

I am trying to run rspec in my rails app using the spec command- but I get the following error:

`require': cannot load such file -- spec/rails/example/helper_example_group_helper (LoadError)

I have had to deal already with missing 'helper' files, but it seems this one is not even in my app but in rails itself.. If I go ahead and create a helper_example_group_helper.rb file, then the error will appear regarding some other missing helper file inside Rails, ad infinitum.

The full log trace: http://pastie.org/pastes/3295692/text

The full gem list: http://pastie.org/pastes/3296070/text

I am running:

  • Ruby 1.9.3-p0

  • Rails 2.3.14

  • rspec 1.2.9 (gem)

  • rspec-rails 1.2.9 (gem)

Any help would be greatly appreciated!

Thanks

6
  • 1
    dude! rspec 1.2 is soooo old! use rspec 2.x! Commented Feb 1, 2012 at 19:03
  • wouldn't that force me to use rails 3? it's not possible unfortunately... Commented Feb 2, 2012 at 7:55
  • i don't think that you need it for 2.1 rubygems.org/gems/rspec-rails/versions/2.1.0 Commented Feb 2, 2012 at 9:02
  • the link you sent explicitly states that Rails 3 is required for RSpec 2.x... :-( Commented Feb 5, 2012 at 9:52
  • äh, no?! the only dependency is rspec?! what are you looking at?!???! Commented Feb 5, 2012 at 14:23

1 Answer 1

2

An old question but it's an issue I hit recently while upgrading a rails app. This issue is specific to Rails 2.3.x and ruby 1.9.3. There's a google groups thread about it here: https://groups.google.com/forum/#!msg/rubyonrails-core/gb5woRkmDlk/iQ2G7jjNWKkJ%5B1-25%5D

The workaround is to add a file to config/initializers with the following:

MissingSourceFile::REGEXPS.push([/^cannot load such file -- (.+)$/i, 1])
Sign up to request clarification or add additional context in comments.

1 Comment

This helped greatly as I try to upgrade a legacy app. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.