0
我是一个noob,通过许多可能知道的教程(testfirst.org)进行工作。我得到下面的错误在terminal.app,当我尝试运行“耙”:运行耙机时发生rspec错误
fname-lnames-macbook-pro:00_hello macbookowner$ rake
(in /Users/macbookowner/Desktop/learn_ruby-master)
/Users/macbookowner/.rvm/gems/[email protected]/gems/bundler-1.3.5/lib/bundler/runtime.rb:216: warning: Insecure world writable dir /Users in PATH, mode 040777
/Users/macbookowner/Desktop/learn_ruby-master/00_hello/hello_spec.rb:116:in `require': cannot load such file -- hello (LoadError)
from /Users/macbookowner/Desktop/learn_ruby-master/00_hello/hello_spec.rb:116:in `<top (required)>'
from /Users/macbookowner/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb:896:in `load'
from /Users/macbookowner/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
from /Users/macbookowner/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb:896:in `each'
from /Users/macbookowner/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb:896:in `load_spec_files'
from /Users/macbookowner/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:22:in `run'
from /Users/macbookowner/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb:80:in `run'
from /Users/macbookowner/.rvm/gems/ruby-1.9.3-p448/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb:17:in `block in autorun'
/Users/macbookowner/.rvm/rubies/ruby-1.9.3-p448/bin/ruby -S rspec /Users/macbookowner/Desktop/learn_ruby-master/00_hello/hello_spec.rb -I/Users/macbookowner/Desktop/learn_ruby-master/00_hello -I/Users/macbookowner/Desktop/learn_ruby-master/00_hello/solution -f documentation -r ./rspec_config failed
fname-lnames-macbook-pro:00_hello macbookowner$
我的问题:到底哪里出问题了?我该如何解决它?
信息:
- 我有两个RVM版本上运行的RVM 1.9.3和2.0.0 RVM
- 我安装了 '创业板安装rspec的' 同一/类似的错误
- 我最好的猜测是,耙子没有找到hello.rb文件[我在Sublime Text 2中创建,并保存在macbookowner - > Desktop上]。当我在桌面上运行ls时,它显示hello.rb。
在此先感谢!
请将代码发布到您的hello.rb文件中。看起来你有一行显示'require'hello',这个红宝石很难找到。 – Momer
@Momer:好的,这里是hello.rb文件的代码(这是非常基本的):'def hello“Hello!”结束' – user2785673
从'hello.rb'和'hello_spec.rb'粘贴你的代码,并且列出你上面问题中每个文件的路径。 – Momer