berkshelf / vagrant-berkshelf

A Vagrant plugin to add Berkshelf integration to the Chef provisioners
Other
378 stars 100 forks source link

Cannot install version >= 5 "this Gemfile contains multiple primary sources" #309

Closed ryaninvents closed 8 years ago

ryaninvents commented 8 years ago

Installing 4.x succeeds (but does not work with Berkshelf 5.x), while installing 5.x fails with the following message:

% vagrant plugin install vagrant-berkshelf --plugin-version '5.0.0'
Installing the 'vagrant-berkshelf --version '5.0.0'' plugin. This can take a few minutes...
Bundler, the underlying system Vagrant uses to install plugins,
reported an error. The error is shown below. These errors are usually
caused by misconfigured plugin installations or transient network
issues. The error from Bundler is:

An error occurred while installing vagrant-berkshelf (5.0.0), and Bundler cannot continue.
Make sure that `gem install vagrant-berkshelf -v '5.0.0'` succeeds before bundling.

Warning: this Gemfile contains multiple primary sources. Using `source` more than once without a block is a security risk, and may result in installing unexpected gems. To resolve this warning, use a block to indicate which gems should come from the secondary source. To upgrade this warning to an error, run `bundle config disable_multisource true`.

To my untrained eye this looks related to the Travis build failure.

Ruby 2.2.0, Mac OS X 10.11, Vagrant 1.7.4, gem 2.2.5, Bundler version 1.6.1, berks 5.1.0, rvm 1.27.0

ryaninvents commented 8 years ago

There was some odd interaction between Vagrant and rvm; I believe it was trying to use the older, system-wide Ruby installation rather than 2.2.0. Closing this issue because it would probably be impossible to reproduce.

If someone else lands here with the same issue, I fixed it by completely removing Vagrant and reinstalling it.