Reputation: 43
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:in
require' 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:in
load' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1226:inblock in load_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in
each' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:inload_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:97:in
setup' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:85:inrun' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:70:in
run' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:38:ininvoke' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/exe/rspec:4:in
' from /usr/bin/rspec:23:inload' from /usr/bin/rspec:23:in
'
Upvotes: 1
Views: 392
Reputation: 1249
Try putting the following at the top of your spec_helper.rb:
require_relative '../lib/zombie'
Upvotes: 1
Reputation: 335
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/
Upvotes: 1