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

Unknown configuration section 'berkshelf' #35

Closed
jkraemer opened this issue Apr 19, 2013 · 13 comments
Closed

Unknown configuration section 'berkshelf' #35

jkraemer opened this issue Apr 19, 2013 · 13 comments

Comments

@jkraemer
Copy link

I'm having a problem here with latest vagrant, berkshelf and vmware fusion.

$ vagrant -v
Vagrant version 1.2.1
$ vagrant plugin list
berkshelf-vagrant (1.1.3)
vagrant-vmware-fusion (0.5.1)

Vagrantfile, Berksfile and the output of 'vagrant up' are there: https://gist.github.com/jkraemer/5418865

The Vagrantfile was generated by berks init, I only modified the box name, box url and run list. Looking at the log it looks like the berkshelf plugin gets loaded successfully, but then it seems to fail to extend vagrant's config mechanism to recognize the berkshelf options...

@jkraemer
Copy link
Author

Adding

require 'berkshelf/vagrant'

to my Vagrantfile fixed this.

Maybe that should be included by default given that the file has been generated by berkshelf?

Now I arrived at issue #24 ...

@ivey
Copy link
Contributor

ivey commented Apr 19, 2013

You shouldn't need to require it, the plugin load should handle it. We recently renamed so maybe try uninstalling berkshelf-vagrant and install vagrant-berkshelf and see if that fixes it?

@ivey ivey closed this as completed Apr 19, 2013
@ivey ivey reopened this Apr 19, 2013
@modius
Copy link

modius commented Apr 20, 2013

Same problem here on OSX, with virtualbox.

$ vagrant -v
Vagrant version 1.2.1 
$ vagrant plugin list
berkshelf-vagrant (1.1.3)
thor (0.18.1)

Setting require 'berkshelf/vagrant' at the top of Vagrantfile gets me a little bit further.

@maxstepanov
Copy link

I hit the same issue today. The problem is in the name of the plugin. Although, berkshelf.com says install "berkshelf-vagrant" it is actually "vagrant-berkshelf"
$ vagrant -v
Vagrant version 1.2.1
$ vagrant plugin list
vagrant-berkshelf (1.2.0)

Also, as ivey pointed out, you don't need to "require" anymore

@mlafeldt
Copy link

FYI, the plugin has been renamed from berkshelf-vagrant to vagrant-berkshelf.

I've removed the old one, and vagrant-berkshelf version 1.2.0 works great for me.

@reset
Copy link
Contributor

reset commented Apr 20, 2013

@ivey maybe having the 1.1.3 release that aliases to vagrant-berkshelf is causing some people issues?

@jkraemer
Copy link
Author

Uninstalling berkshelf-vagrant and installing vagrant-berkshelf 1.2.0 fixed the problem, thanks!

Since the website seems to have been updated to reflected the new name I think we can close this one.

@secretfader
Copy link

I have version 1.2.0 of vagrant-berkshelf and 1.2.2 of Vagrant installed, and I'm still encountering this error. Adding require berkshelf/vagrant at the top of my Vagrantfile doesn't seem to resolve the issue for me.

My Vagrantfile:

# -*- mode: ruby -*-
# vi: set ft=ruby :

require 'berkshelf/vagrant'

Vagrant::Config.run do |config|
  config.vm.box = 'precise64'
  config.vm.box_url = 'http://files.vagrantup.com/precise64.box'
  config.berkshelf.berksfile_path = 'Berksfile'
  config.berkshelf.enabled = true
  config.vm.forward_port 3000, 3000
  config.vm.provision :chef_solo do |chef|
    # cookbooks
  end
end

...and the errors that are thrown:

* Unknown configuration section 'berkshelf'. If this section was part of
a Vagrant 1.0.x plugin, note that 1.0.x plugins are incompatible with 1.1+.

@ivey
Copy link
Contributor

ivey commented Apr 24, 2013

@nicholaswyoung Can you gist me the full output of the Vagrant run please?

@ivey ivey reopened this Apr 24, 2013
@secretfader
Copy link

@ivey I'm still working out a few Chef kinks, but this should give you an idea of what's happening:

https://gist.github.com/nicholaswyoung/a831d84dc579aaf9d185

@ivey
Copy link
Contributor

ivey commented Apr 29, 2013

@nicholaswyoung can I see vagrant plugin list output please?

@talaris
Copy link

talaris commented Apr 29, 2013

You may want to try replacing the first Vagrant config line

Vagrant::Config.run do |config|

with

Vagrant.configure("2") do |config|

I believe the Config.run is a 1.0.x backwards compatible mode.

see: http://docs.vagrantup.com/v2/vagrantfile/version.html

@reset
Copy link
Contributor

reset commented May 1, 2013

@nicholaswyoung this is because you are using the old Config builder syntax. @talaris is correct in his message to you :)

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

8 participants