librarian-puppet,rbenv,Gem :: Specification.reset期间未解析的规范

时间:2014-07-23 18:28:56

标签: ruby-on-rails ruby puppet rbenv

我尝试使用librarian-puppet作为在项目中设置Vagrant的过程的一部分。当我在一个临时目录中运行librarian-puppet init时,它可以很好地创建Puppetfile。

但是,当我尝试在项目中运行它时,我得到以下内容:

WARN: Unresolved specs during Gem::Specification.reset:
      highline (>= 0)
      activemodel (< 4.2, >= 3.0.0)
      activesupport (< 4.2, >= 3.0.0)
      faraday (< 1.0, >= 0.8)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
/home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/puppet_forge-1.0.3/lib/puppet_forge.rb:7:in `require': cannot load such file -- puppet_forge/version (LoadError)
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/puppet_forge-1.0.3/lib/puppet_forge.rb:7:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/lib/librarian/puppet/source/forge/repo_v3.rb:2:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/lib/librarian/puppet/source/forge.rb:4:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/lib/librarian/puppet/source.rb:4:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/lib/librarian/puppet/dsl.rb:3:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/lib/librarian/puppet/environment.rb:2:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/lib/librarian/puppet/extension.rb:1:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/lib/librarian/puppet.rb:4:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/lib/librarian/puppet/cli.rb:4:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:73:in `require'
        from /home/sean/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/librarian-puppet-1.1.3/bin/librarian-puppet:6:in `<top (required)>'
        from /home/sean/.rbenv/versions/2.1.2/bin/librarian-puppet:23:in `load'
        from /home/sean/.rbenv/versions/2.1.2/bin/librarian-puppet:23:in `<main>'
        from /home/sean/.rbenv/versions/2.1.2/bin/ruby_executable_hooks:15:in `eval'
        from /home/sean/.rbenv/versions/2.1.2/bin/ruby_executable_hooks:15:in `<main>'

我已经尝试了this question中的解决方案,以及其他一些东西(重新安装ruby版本,以及gems,删除Guardfile,rbenv rehash,运行&# 39;宝石清理&#39;)

现在,似乎rbenv正在尝试使用项目的gemset而不是全局安装的gemset。有没有办法让rbenv运行命令并忽略项目宝石?

版本

  • rbenv 0.4.0-98-g13a474c
  • Ruby 2.1.2(通过rbenv中的ruby-build安装)
  • librarian-puppet 1.1.3
  • puppet 3.6.2

3 个答案:

答案 0 :(得分:1)

我在现有存储库librarian-puppet update上遇到了类似的问题。我猜测我们的$ LOAD_PATH在某种程度上搞砸了,因为我可以在本地更新forge-ruby gem以包含带有require_relative的文件。我不得不核对整个ruby安装(rbenv uninstall <version>)然后重新安装它,捆绑器和所需的宝石。

我正在使用:

  • repo with rbenv 0.4
  • ruby​​ 1.0.3
  • librarian-puppet 1.3.2
  • puppet 3.2.4

答案 1 :(得分:1)

运行`gem cleanup。 http://nathanhoad.net/how-to-clean-up-old-gems

gem cleanup highline
gem cleanup activemodel
gem cleanup activesupport
gem cleanup faraday

为我工作。

答案 2 :(得分:0)

通过不再使用librarian-puppet来解决这个问题。还将所有Puppet内容拆分为它自己的回购,因为我们转移到Puppet主设置而不是独奏Puppet。