【问题标题】:Could not find rake-10.0.3 in any of the sources (Bundler::GemNotFound) [duplicate]在任何源中都找不到 rake-10.0.3 (Bundler::GemNotFound) [重复]
【发布时间】:2013-01-16 03:05:59
【问题描述】:

可能重复:
Could not find rake-10.0.3 in any of the sources

我一直在尝试使用 capistrano 将 rails 3 应用程序部署到 bluehost。并弹出此错误 Could not find rake-10.0.3 in any of the sources (Bundler::GemNotFound)

我安装了rake 10.0.3。这是错误日志

0   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/spec_set.rb    90  in `materialize'
1   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/spec_set.rb    83  in `map!'
2   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/spec_set.rb    83  in `materialize'
3   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/definition.rb  113 in `specs'
4   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/definition.rb  158 in `specs_for'
5   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/definition.rb  147 in `requested_specs'
6   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/environment.rb 23  in `requested_specs'
7   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler/runtime.rb 11  in `setup'
8   /home/myaccount/.rvm/gems/ruby-1.9.3-p362/gems/bundler-1.2.3/lib/bundler.rb 116 in `setup'

提前致谢

【问题讨论】:

  • 在弹出这个命令之前你运行了什么命令?
  • 实际上,这不是命令。错误出现在页面上

标签: ruby-on-rails ruby-on-rails-3 capistrano passenger


【解决方案1】:

似乎您没有使用带有 rvm 的正确 gem 集。因此,即使您可以看到 gem 已安装,它也不会被 rvm 拾取。前段时间我写了这篇关于如何create gem sets with rvm

的博文

尝试创建具有 rake 10.0.3 的 rvm gem 集,然后尝试再次运行 bundle install。

HTH

【讨论】:

    【解决方案2】:

    将以下内容添加到您的 Gemfile 可能会解决问题:

    source 'https://rubygems.org'
    

    由于某种原因,我自己删除了它。

    【讨论】:

    • 我的 Gemfile 中有该行。我刚刚放弃了 bluehost,转而使用专用主机。
    • 是的,现在一切正常
    • 添加源 'rubygems.org' 对我有用。我最初有源'rubygems.org',但在我升级到 ruby​​ 2.0.0 后它不起作用,所以我删除了它。猜猜它只需要'https'
    猜你喜欢
    • 2018-04-08
    • 2012-04-19
    • 2015-03-04
    • 2014-07-11
    • 2019-11-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-03-08
    相关资源
    最近更新 更多