tahalam
tahalam

Reputation: 43

Problems with Rspec and/or Rspec-core

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'

Upvotes: 1

Views: 392

Answers (2)

jmccure
jmccure

Reputation: 1249

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

require_relative '../lib/zombie'

Upvotes: 1

Gustavo Rego
Gustavo Rego

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

Related Questions