berkshelf / vagrant-berkshelf

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

vagrant-berkshelf no longer compatible with Chefdk Ruby environment #303

Closed efalkner closed 8 years ago

efalkner commented 8 years ago

The latest version of ChefDK, 0.17.17, installs with version 2.1.8 of Ruby but vagrant-berkshelf requires version 2.2 or above. Chef documentation suggests using ChefDK quite strongly. Are there any suggestions for a work around, aside from installing another ruby version, for provisioning this plugin?

$ chef --version
Chef Development Kit Version: 0.17.17
$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 2.6.6
  - RUBY VERSION: 2.1.8 (2015-12-16 patchlevel 440) [x86_64-darwin13.0]
$ vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' 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`.Gem::InstallError: vagrant-berkshelf requires Ruby version >= 2.2.0.
thommay commented 8 years ago

We'll be releasing a chefdk containing ruby 2.3 next week. In the meantime, install vagrant-berkshelf with a version vagrant plugin install vagrant-berkshelf -v 4.1.0 (the differences between 4.1.0 and 5.0.0 are pretty much just the ruby version bump), or install a nightly of chefdk. Sorry for the inconvenience, trying to marshall all these things at once are occasionally painful!

efalkner commented 8 years ago

Thank you for your suggestion. This work around did work for me. For visibility, I've updated to Vagrant 1.8.5 (latest) and installed the vagrant berkshelf plugin using the command: vagrant plugin install vagrant-berkshelf --plugin-version "4.1.0"