1

我升级到最新版本的 vagrant

$ vagrant -v
Vagrant 1.4.1

重新安装了我的插件:

# Uninstall plugins
for i in vagrant-omnibus vagrant-chef-zero vagrant-berkshelf
do vagrant plugin uninstall $i
done

# Install plugins
for i in vagrant-omnibus vagrant-chef-zero vagrant-berkshelf
do vagrant plugin install $i
done

$ vagrant plugin list
vagrant-berkshelf (1.3.7)
vagrant-chef-zero (0.5.2)
vagrant-omnibus (1.2.1)

但是 vagrant-berkshelf 插件没有加载。

$ vagrant up
Failed to load the "vagrant-berkshelf" plugin. View logs for more details.

跟踪

DEBUG environment: Loading plugins from: /home/mark/.vagrant.d/plugins.json
 INFO environment: Loading plugin from JSON: vagrant-omnibus
 INFO manager: Registered plugin: vagrant-omnibus
 INFO environment: Loading plugin from JSON: vagrant-chef-zero
 INFO manager: Registered plugin: chef_zero
 INFO environment: Loading plugin from JSON: vagrant-berkshelf
ERROR root: Failed to load plugin: vagrant-berkshelf
ERROR root:  -- Error: #<Gem::LoadError: Unable to activate berkshelf-2.0.10, because ridley-2.4.0 conflicts with ridley (~> 1.5.0)>
ERROR root:  -- Backtrace:
ERROR root: /opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/specification.rb:2007:in `raise_if_conflicts'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/specification.rb:1176:in `activate'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/specification.rb:1212:in `block in activate_dependencies'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `each'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/specification.rb:1198:in `activate_dependencies'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/specification.rb:1180:in `activate'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems.rb:186:in `rescue in try_activate'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems.rb:183:in `try_activate'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:117:in `rescue in require'
/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:124:in `require'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant.rb:200:in `require_plugin'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/environment.rb:760:in `block in load_plugins'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/environment.rb:751:in `each'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/environment.rb:751:in `load_plugins'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.1/lib/vagrant/environment.rb:132:in `initialize'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.1/bin/vagrant:105:in `new'
/opt/vagrant/embedded/gems/gems/vagrant-1.4.1/bin/vagrant:105:in `<top (required)>'
/opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
/opt/vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
 INFO interface: error: Failed to load the "vagrant-berkshelf" plugin. View logs for more details.

Failed to load the "vagrant-berkshelf" plugin. View logs for more details.

有谁知道如何解决 vagrant 插件之间的 gem 冲突?

ERROR root:  -- Error: #<Gem::LoadError: Unable to activate berkshelf-2.0.10, 
   because ridley-2.4.0 conflicts with ridley (~> 1.5.0)>
4

2 回答 2

2

您也可以通过以下方式卸载 Ridley 2.4

env GEM_HOME=~/.vagrant.d/gems gem uninstall ridley -v 2.4.0
于 2014-01-03T22:55:26.873 回答
1

这是一个已知的问题。在我们有时间发布新版本之前,您可以使用此处描述的“出血边缘”:https ://github.com/berkshelf/berkshelf/wiki/Howto:-Use-the-bleeding-edge 。

资料来源:

  • 核心团队成员
于 2013-12-20T23:57:39.237 回答