【问题标题】:Could not find 'bundler' (>= 0) among 10 total gem(s) (Gem::LoadError)在总共 10 个 gem(s) (Gem::LoadError) 中找不到 'bundler' (>= 0)
【发布时间】:2013-10-01 18:57:59
【问题描述】:

我在运行我的厨师食谱时遇到错误。 rvm、apache 乘客是使用社区厨师食谱安装的。

STDERR: /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:298:in `to_specs': Could not find 'bundler' (>= 0) among 10 total gem(s) (Gem::LoadError)
    from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:309:in `to_spec'
    from /usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/core_ext/kernel_gem.rb:47:in `gem'
    from /usr/local/rvm/gems/ruby-1.9.3-p125@global/bin/bundle:22:in `<main>'
    from /usr/local/rvm/gems/ruby-1.9.3-p125/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-1.9.3-p125/bin/ruby_executable_hooks:15:in `<main>'

谁能告诉我为什么会出现这个错误。我检查了 bundler gem 是否已安装。

【问题讨论】:

  • 更多细节,如何运行?

标签: ruby gem rvm bundler chef-infra


【解决方案1】:

当您只设置了PATH 而没有设置GEM_HOME 和/或GEM_HOME 时会发生这种情况。

【讨论】:

  • 我正在运行 rvm 食谱和 apache 乘客食谱,然后是我的项目的食谱。我认为 rvm 正在 ruby​​1.9.3@global 而不是 ruby​​1.9.3 中安装捆绑程序。我收到此错误的代码如下,这是我的食谱的一部分:执行“安装 olympus_app gem dependencies”do cwd node[:olympus_app][:dir] command 'bundle install --without test integration development --path vendor /cache' 用户节点[:olympus_app][:apache_user] 组节点[:olympus_app][:apache_group] end
  • 如何使已安装的 ruby​​ 可用于收据?你在设置PATH吗? rvm 默认 gem 安装在 @global 中,这是正确的行为。
  • 我得到了这个工作。 rvm 食谱默认安装的是 1.8.7 版本,这导致了这个问题。我现在将默认版本 = 1.9.3 作为服务器属性传递。感谢您的帮助。
猜你喜欢
  • 1970-01-01
  • 2016-09-18
  • 2015-03-02
  • 1970-01-01
  • 2021-09-19
  • 2022-07-26
  • 1970-01-01
  • 2011-12-13
  • 2018-04-12
相关资源
最近更新 更多