Skip to content
This repository has been archived by the owner on Dec 26, 2017. It is now read-only.

Support for the latest ChefDK (version 0.9.0) and Berkshelf v4 #293

Closed
phillipsnick opened this issue Oct 8, 2015 · 10 comments
Closed

Support for the latest ChefDK (version 0.9.0) and Berkshelf v4 #293

phillipsnick opened this issue Oct 8, 2015 · 10 comments

Comments

@phillipsnick
Copy link

I have just updated to the latest ChefDK as I have been experiencing a few odd issues, while the update has resolved those issues it has now broken my Vagrant setup.

It appears to be because vagrant-berkshelf requires version 3 but the latest ChefDK ships with version 4.

The Berkshelf version at "/opt/chefdk/bin/berks" is invalid.
Vagrant Berkshelf requires ~> 3.2, but the current version is 4.0.1.

Please download and install the latest version of the ChefDK from:

    https://downloads.chef.io/chef-dk

and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.
$ chef -v
Chef Development Kit Version: 0.9.0
chef-client version: 12.5.1
berks version: 4.0.1
kitchen version: 1.4.2

$ which berks
/opt/chefdk/bin/berks
@reset
Copy link
Contributor

reset commented Oct 8, 2015

A new version of Vagrant Berkshelf was released (4.1.0) which supports Berkshelf 4.0.x. Upgrade and you're good to go!

@reset reset closed this as completed Oct 8, 2015
@phillipsnick
Copy link
Author

Thanks :)

@mmell
Copy link

mmell commented Oct 22, 2015

Be sure to vagrant plugin update!

@jaconstantine
Copy link

vagrant plugin update fixed this for me

@jpeyret
Copy link

jpeyret commented Jan 6, 2016

Agree, updating to version 4.1.0 of the plugin solved my problem, BUT vagrant plugin update was not enough, because it was leaving me at 4.0.4. I had to run vagrant plugin install vagrant-berkshelf as per instruction on @ https://github.com/berkshelf/vagrant-berkshelf

$ vagrant plugin update
Updating installed plugins...
All plugins are up to date.

(wrong, I am still at 4.0.4)

$ vagrant plugin list
vagrant-berkshelf (4.0.4)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.5, system)

vagrant plugin install vagrant-berkshelf

$ vagrant plugin list
vagrant-berkshelf (4.1.0)
vagrant-omnibus (1.4.1)
vagrant-share (1.1.5, system)

(good now)

@simsketch
Copy link

simsketch commented Sep 24, 2016

I have a similar issue but it says all my plugins are up-to-date.

simsketch@zito:/usr/slate/slate-saas$ vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
The Berkshelf version at "/usr/bin/berks" is invalid.
Vagrant Berkshelf requires ~> 4.0, but the current version is 5.1.0.

Please download and install the latest version of the ChefDK from:

    https://downloads.chef.io/chef-dk

and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.


simsketch@zito:/usr/slate/slate-saas$ /usr/bin/berks -v
5.1.0
simsketch@zito:/usr/slate/slate-saas$ vagrant plugin list
vagrant-berkshelf (5.0.0)
vagrant-cachier (1.2.1)
vagrant-hostmanager (1.8.5)
vagrant-share (1.1.5, system)
vagrant-vbguest (0.13.0)
simsketch@zito:/usr/slate/slate-saas$ sudo vagrant plugin update
Updating installed plugins...
All plugins are up to date.
simsketch@zito:/usr/slate/slate-saas$ vagrant up --provision
Bringing machine 'default' up with 'virtualbox' provider...
The Berkshelf version at "/usr/bin/berks" is invalid.
Vagrant Berkshelf requires ~> 4.0, but the current version is 5.1.0.

Please download and install the latest version of the ChefDK from:

    https://downloads.chef.io/chef-dk

and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.


simsketch@zito:/usr/slate/slate-saas$ /usr/bin/vagrant -v
Vagrant 1.8.5
simsketch@zito:/usr/slate/slate-saas$ 

@davidcpell
Copy link

davidcpell commented Sep 27, 2016

My issue is similar to @simsketch's:

➜  vagrant plugin install vagrant-berkshelf
Installing the 'vagrant-berkshelf' plugin. This can take a few minutes...
Installed the plugin 'vagrant-berkshelf (5.0.0)'!
Post install message from the 'vagrant-berkshelf' plugin:

The Vagrant Berkshelf plugin requires Berkshelf from the Chef Development Kit.
You can download the latest version of the Chef Development Kit from:

    https://downloads.chef.io/chef-dk/

Installing Berkshelf via other methods is not officially supported.
➜  vagrant provision
The following berks command failed to execute:

    /Users/david/.rbenv/shims/berks --version --format json

The stdout and stderr are shown below:

    stdout:
    stderr: /Users/david/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': Could not find 'berkshelf' (>= 0) among 46 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/opt/vagrant/embedded/gems', execute `gem env` for more information
        from /Users/david/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/dependency.rb:324:in `to_spec'
        from /Users/david/.rbenv/versions/2.2.2/lib/ruby/2.2.0/rubygems/core_ext/kernel_gem.rb:64:in `gem'
        from /Users/david/.rbenv/versions/2.2.2/bin/berks:22:in `<main>'


It appears that you are not using the ChefDK. Please note that Vagrant Berkshelf
works best when used with the ChefDK, and other installation methods are not
officially supported.

Please download and install the latest version of the ChefDK from:

    https://downloads.chef.io/chef-dk

and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.
➜  chef exec vagrant provision
The Berkshelf version at "/opt/chefdk/bin/berks" is invalid.
Vagrant Berkshelf requires ~> 4.0, but the current version is 5.1.0.

Please download and install the latest version of the ChefDK from:

    https://downloads.chef.io/chef-dk

and follow the installation instructions. Do not forget to add the ChefDK to
your PATH.
➜  chef -v
Chef Development Kit Version: 0.18.26
chef-client version: 12.14.89
delivery version: master (d86679335580be3de22996ef294b20d525889d8d)
berks version: 5.1.0
kitchen version: 1.12.0
➜  vagrant -v
Vagrant 1.8.4
➜  vagrant plugin update
Updating installed plugins...
All plugins are up to date.

@CharlesTBetz
Copy link

I have same issue as @davidcpell. Running Ubuntu 16.04.

@davidcpell
Copy link

@CharlesTBetz @simsketch there's another issue already open for this: #305

@bhazard
Copy link

bhazard commented Oct 19, 2016

vagrant plugin update now updates to vagrant-berkshelf 5.1.0 which fixed this issue for me.

@berkshelf berkshelf locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants