[英]Problems with Rspec and/or Rspec-core
I installed rspec and also did rspec --init. 我安装了rspec,也做了rspec --init。 (I've gone through directions from here http://rspec.codeschool.com/levels/1 multiple times).
(我已经多次浏览了http://rspec.codeschool.com/levels/1上的说明 )。
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-c/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'来自/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
从/Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration加载中.rb:1226:在block in load_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in
.rb:block in load_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224:in
:在/ Library中的每个' /Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/configuration.rb:1224load_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner.rb:97:in
/Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/lib/rspec/core/runner .rb:85:在run' 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:70:in
/ Library / Ruby /宝石/2.0.0/gems/rspec-c ore-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
'ore-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
中invoke' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-3.2.0/exe/rspec:4:in
'来自/ usr / bin / rspec:23:inload' from /usr/bin/rspec:23:in
'
Be sure your terminal's current folder is Users/Qureshi then run the command rspec spec
确保终端的当前文件夹为Users / Qureshi,然后运行命令
rspec spec
If it does not work, your file (or entire folder) is access blocked, or does not exist in /Users/Qureshi/spec/lib/ 如果不起作用,则说明您的文件(或整个文件夹)被阻止访问,或者/ Users / Qureshi / spec / lib /中不存在
尝试将以下内容放在spec_helper.rb的顶部:
require_relative '../lib/zombie'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.