无法使用任何版本的Vagrant安装vagrant-berkshelf插件版本1.3.7

时间:2014-06-05 04:49:11

标签: gem installation dependencies vagrant berkshelf

我的团队项目要求我使用vagrant-berkshelf插件,特别是版本1.3.7。团队中的其他人正在运行Vagrant 1.3.5,尽管我已尝试在1.2.7,1.3.5和1.4.3上安装,但都有相同的错误。

安装时输出:

    mentat@odrade:~$ vagrant plugin install vagrant-berkshelf --plugin-version 1.3.7
Installing the 'vagrant-berkshelf --version '1.3.7'' plugin. This can take a few minutes...
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency_installer.rb:211:in `gather_dependencies': Unable to resolve dependencies: ridley requires buff-extensions (~> 0.3); buff-config requires buff-extensions (~> 0.3); varia_model requires buff-extensions (~> 1.0) (Gem::DependencyError)
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/dependency_installer.rb:333:in `install'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/action/install_gem.rb:65:in `block in call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/gem_helper.rb:42:in `block in with_environment'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/user_interaction.rb:40:in `use_ui'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/gem_helper.rb:41:in `with_environment'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/action/install_gem.rb:52:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/action/bundler_check.rb:20:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/warden.rb:34:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/builder.rb:116:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `block in run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/action/runner.rb:69:in `run'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/command/base.rb:17:in `action'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/command/install.rb:27:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/plugins/commands/plugin/command/root.rb:56:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/cli.rb:38:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/lib/vagrant/environment.rb:484:in `cli'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.4.3/bin/vagrant:127:in `<top (required)>'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'

依赖性问题与ridley,buff-extensions和buff-config有关。我目前正在使用RVM和Ruby 1.9.3-p448,并且gem列表显示我应该满足这些依赖性。如果我尝试安装vagrant-berkshelf插件的一个版本,我会得到一个不同的依赖项问题列表(但这是一个没有实际意义的点,因为我需要在1.3.7上)。

有什么想法吗?

1 个答案:

答案 0 :(得分:5)

我能够通过安装所需的宝石来实现这一目标:

env GEM_HOME=~/.vagrant.d/gems gem install buff-extensions -v 0.3.0
env GEM_HOME=~/.vagrant.d/gems gem install buff-extensions -v 1.0.0
vagrant plugin install vagrant-berkshelf --plugin-version 1.3.7

我还没有完成测试,所以我不确定在跑步时是否会发生冲突。

---编辑---

如果您执行上述操作,则插件无法加载 相反,请确保安装较早版本的varia_model gem。我建议0.3.2。此gem不需要更高版本的buff-extensions

env GEM_HOME=~/.vagrant.d/gems gem install varia_model -v 0.3.2
vagrant plugin install vagrant-berkshelf --plugin-version 1.3.7