Ruby命令行错误

时间:2014-06-21 15:02:11

标签: osx-mavericks

嗨,我是所有这些节目的新手。试图通过Odin项目学习。他们让我用命令' rake'进行测试。在我的命令行上。我安装了ruby版本2.1.2并安装了rspec。无论如何,我在尝试运行命令时遇到此错误' rake'。

Joel-Prestons-MacBook-Air-4:00_hello joelpreston$ rake
(in /Users/joelpreston/learnRuby/learn_ruby)
rake aborted!
Gem::LoadError: can't activate rspec (~> 2), already activated rspec-3.0.0. Make sure all dependencies are added to Gemfile.
/Users/joelpreston/.rvm/gems/ruby-2.1.2@global/gems/bundler-1.6.2/lib/bundler/rubygems_integration.rb:262:in `block in replace_gem'
/Users/joelpreston/learnRuby/learn_ruby/Rakefile:2:in `<top (required)>'
/Users/joelpreston/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
/Users/joelpreston/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `<main>'
(See full trace by running task with --trace)
Joel-Prestons-MacBook-Air-4:00_hello joelpreston$ 

任何人都可以解释一下我需要做什么来让rake运行吗?提前致谢。乔尔

1 个答案:

答案 0 :(得分:0)

我有同样的问题。我遇到了这个解决方案,

安装rspec版本低于3.0.0。

sudo gem install -v '< 3.0.0' rspec

我不确定这是长期解决方案,但它对我有用。

我在Jayson Virissimo的帖子中找到了它: Rake aborted: could not find rspec