small medium large xlarge

Generic-user-small
30 Aug 2017, 02:19
Joel (7 posts)

i get the following error: /Users/compost/.rbenv/versions/2.4.1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- spec_helper (LoadError) from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb:1453:in `block in requires=' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb:1453:in `each' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration.rb:1453:in `requires=' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration_options.rb:112:in `block in process_options_into' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration_options.rb:111:in `each' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration_options.rb:111:in `process_options_into' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/configuration_options.rb:21:in `configure' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:99:in `setup' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:86:in `run' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:71:in `run' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/lib/rspec/core/runner.rb:45:in `invoke' from /Users/compost/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/rspec-core-3.6.0/exe/rspec:4:in `<top (required)>' from /Users/compost/.rbenv/versions/2.4.1/bin/rspec:22:in `load' from /Users/compost/.rbenv/versions/2.4.1/bin/rspec:22:in `<main>'

Myron-profile-img_pragsmall
30 Aug 2017, 03:27
Myron Marston (13 posts)

Somewhere there’s a --require spec_helper (or -rspec_helper) option that’s telling RSpec to try to load a spec_helper file, but the project does not have one at this point. My guess is you’ve got the option in one of the dot files:

  • ~/.rspec (e.g. .rspec in your home directory)
  • ./.rspec (e.g. .rspec in your project directory)
  • ./.rspec-local (e.g. .rspec-local in your project directory)

If you’ve got it in any of these files, remove it. You don’t need that option for the little project you work on in chapter 1, and the option doesn’t make sense to apply globally via ~/.rspec because, as you’ve seen, not every project will have a spec_helper file.

Please let us know if that fixes your problem!

Myron

Generic-user-small
30 Aug 2017, 17:04
Joel (7 posts)

yep, it was in my .rspec file in the home dir

Thanks!

You must be logged in to comment