【问题标题】:Rake abort error耙子中止错误
【发布时间】:2014-07-10 03:27:02
【问题描述】:

好的,所以我正在做以下 Ruby 教程:https://github.com/alexch/learn_ruby

我已经保存了c:/learn_ruby下的所有文件

当我在目录中运行rake 时:“00_hello”出现以下错误:

c:\learn_ruby\00_hello>rake
(in c:/learn_ruby)
rake aborted!
Could not find 'rspec' (~> 2) - did find: [rspec-3.0.0]
Checked in 'GEM_PATH=C:/Users/******/.gem/ruby/1.9.1;C:/Ruby193/lib/ruby/gems/1
.9.1', execute `gem env` for more information

我目前的宝石清单是:

bigdecimal (1.1.0)
diff-lcs (1.2.5)
io-console (0.3)
json (1.5.5)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.5)
rspec (3.0.0)
rspec-core (3.0.2)
rspec-expectations (3.0.2)
rspec-mocks (3.0.2)
rspec-support (3.0.2)
rubygems-update (2.3.0)

我是 Ruby 的新手,有人可以帮帮一个菜鸟吗?我尝试安装 rspec 2.0.0,但出现不同的错误。

【问题讨论】:

    标签: ruby-on-rails ruby ruby-on-rails-3 rspec rake


    【解决方案1】:

    错误信息

    Could not find 'rspec' (~> 2)
    

    表示它正在寻找 2.x 范围内的 rspec。通常这意味着您有一个Gemfile,它指定gem 'rspec', '~> 2'~> 将其与同一版本的“家庭”联系在一起;有关详细信息,请参阅 bundler 文档。

    通常的解决方案是输入

    bundle install
    

    这将确保满足您的先决条件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-09-16
      • 1970-01-01
      • 2011-10-25
      • 2014-07-21
      • 1970-01-01
      • 2023-03-14
      • 2014-08-02
      • 2011-09-08
      相关资源
      最近更新 更多