1
votes

I installed rspec and also did rspec --init. (I've gone through directions from here http://rspec.codeschool.com/levels/1 multiple times).

However, every time I try to run a spec from my command line, it won't load (please see below). Please help if you know what may be going wrong.

/Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:in require': cannot load such file -- zombie (LoadError) from /Library/Ruby/Site/2.0.0/rubygems/core_ext/kernel_require.rb:54:inrequire' from /Users/Qureshi/spec/lib/zombie_spec.rb:2:in <top (required)>' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:inload' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:in block in load_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:ineach' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in load_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:97:insetup' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:85:in run' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:70:inrun' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:38:in invoke' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/exe/rspec:4:in' from /usr/bin/rspec:23:in load' from /usr/bin/rspec:23:in'

2
What command are you using to run, and what folder are your rspec files?Gustavo Rego

2 Answers

1
votes

Try putting the following at the top of your spec_helper.rb:

require_relative '../lib/zombie'

1
votes

Be sure your terminal's current folder is Users/Qureshi then run the command rspec spec

If it does not work, your file (or entire folder) is access blocked, or does not exist in /Users/Qureshi/spec/lib/