1

我有:ruby 1.8.7、gem 2.0.3 和 rails 2.3.5

每当我为需要调试的项目运行 rake 时,它​​都会给我以下错误。

unknown0026bb1748b0:00_hello zed$ rake (in /Users/zedpisec/RUBY/learn_ruby) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: 没有这样的文件或目录——rspec (LoadError) rake中止!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S rspec /Users/zed/RUBY/learn_ruby/00_hello/hello_spec.rb -I/Users/zed/RUBY/learn_ruby/00_hello - I/Users/zed/RUBY/learn_ruby/00_hello/solution -f 文档 -r ./rspec_config 失败

我的问题是:

  1. 我该如何解释这个?我非常想知道计算机到底在告诉我什么,以便我相应地解决这个问题。

    该练习要求我修复源代码上的错误,但根据说明,这不是我应该得到的错误

  2. 有什么具体的细节需要注意吗?这是我运行 --trace 时的样子

** 调用默认值 (first_time) ** 调用规范 (first_time) ** 执行规范 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: 没有这样的文件或目录 -- rspec (LoadError)耙中止!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S rspec /Users/zed/RUBY/learn_ruby/00_hello/hello_spec.rb -I/Users/zed/RUBY/learn_ruby/00_hello - I/Users/zed/RUBY/learn_ruby/00_hello/solution -f 文档 -r ./rspec_config 失败 /Users/zed/.gem/ruby/1.8/gems/rspec-core-2.13.1/lib/rspec/core/ rake_task.rb:156:inrun_task' /Users/zed/.gem/ruby/1.8/gems/rspec-core-2.13.1/lib/rspec/core/rake_task.rb:124:in初始化'/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:1112:in verbose' /Users/zed/.gem/ruby/1.8/gems/rspec-core-2.13.1/lib/rspec/core/rake_task.rb:122:insend'/Users/zed/.gem/ruby /1.8/gems/rspec-core-2.13.1/lib/rspec/core/rake_task.rb:122:ininitialize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:636:in调用'/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:636:in execute' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:631:ineach'/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr /lib/ruby/1.8/rake.rb:631:in execute' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:597:ininvoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:590:ininvoke_with_call_chain' /System /Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:607:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:604:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby /1.8/rake.rb:604:in invoke_prerequisites' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:596:ininvoke_with_call_chain' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in synchronize' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:590:ininvoke_with_call_chain' /System/Library/Frameworks /Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:583:ininvoke' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2051:ininvoke_task' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2029:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2029:ineach' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr /lib/ruby/1.8/rake.rb:2029:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2068:instandard_exception_handling' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2023:in top_level' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2001:inrun' /System /Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:2068:in standard_exception_handling' /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rake.rb:1998:inrun' /usr/bin/rake:31

我的猜测是我没有安装某些东西或某些东西需要更新。无论如何,任何能指引我正确方向的线索或想法都将不胜感激。如果这个问题最终变得非常简单,我深表歉意,我对这件事很陌生,并且正在努力学习如何解决它。
我试图到处寻找线索,但无济于事,没有解决我的具体问题。我尝试了一些提供给有类似问题的人的解决方案,但没有给我任何结果。

帮帮我obi wan kenobi,你是我唯一的希望。

4

0 回答 0