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

Undefined method "berksfile=" #24

Closed
Benedict opened this issue Apr 16, 2013 · 17 comments
Closed

Undefined method "berksfile=" #24

Benedict opened this issue Apr 16, 2013 · 17 comments
Labels

Comments

@Benedict
Copy link

When ever I run vagrant provision I get the following error:

/Users/ben/.vagrant.d/gems/gems/berkshelf-vagrant-1.1.0/lib/berkshelf/vagrant/action/install.rb:21:in `call': undefined method `berksfile=' for nil:NilClass (NoMethodError)

This only happens when I run the vmware_fusion provider, the virtualbox provider doesn't cause this error. You can see the full output here:

https://gist.github.com/Benedict/5398961

Any pointers would be greatly appreciated.

@reset
Copy link
Contributor

reset commented Apr 16, 2013

Hey @Benedict could you please post your Vagrantfile?

@Benedict
Copy link
Author

Certainly :)

require 'berkshelf/vagrant'

Vagrant.configure("2") do |config|
  config.berkshelf.berksfile_path = 'Berksfile'
  config.berkshelf.enabled = true
  config.vm.box = "precise64"
  config.vm.network :private_network, ip: "33.33.33.10"
  config.vm.provision :chef_solo do |chef|
    chef.add_recipe "apt"
    chef.add_recipe "dotdeb"
  end
end

@tmatilai
Copy link
Contributor

I'm hitting this too. vagrant up works but vagrant provision errors out. Tested now with Vagrant 1.2.1, berkshelf-vagrant 1.1.2 and vagrant-vmware-fusion 0.5.1.

@tmatilai
Copy link
Contributor

Would @mitchellh have idea what's the difference between vbox and fusion providers here?

@ivey
Copy link
Contributor

ivey commented Apr 18, 2013

I've found the problem on AWS in #31 and suspect it's same issue for VMWare. Will try to fix tonight. If you have time and want to speed things up, can you dig into the VMWare plugin and see if it uses a custom provision action, like AWS does?

@tmatilai
Copy link
Contributor

@ivey The fusion provider is closed source (and encrypted), so it's a bit challenging. =)
That's why I called Mitchell for help.

@mitchellh
Copy link

It doesn't use a custom provision action.

Sent from my iPhone

On Apr 18, 2013, at 2:55 PM, Teemu Matilainen notifications@github.com wrote:

@ivey The fusion provider is closed source (and encrypted), so it's a bit challenging. =)
That's why I called Mitchell for help.


Reply to this email directly or view it on GitHub.

@jkraemer
Copy link

same problem here...

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

jkraemer added a commit to jkraemer/vagrant-berkshelf that referenced this issue Apr 19, 2013
@jkraemer
Copy link

for me this fixed it. I am however totally unsure of any possible side effects this might cause.

@ocxo
Copy link

ocxo commented Apr 19, 2013

Having this same problem.

@ivey
Copy link
Contributor

ivey commented Apr 19, 2013

Interesting. That suggests our setup hook isn't firing. @mitchellh does vmware use ::Vagrant::Action::Builtin::ConfigValidate? That's what we hook our setup to.

@tmatilai
Copy link
Contributor

Okay, after way too many vagrant reload commands I tried to take a look. The debug output confirms that the vmware_fusion provider indeed doesn't invoke Vagrant::Action::Builtin::ConfigValidate.

@sethvargo
Copy link
Contributor

@mitchellh ^

@ocxo
Copy link

ocxo commented Apr 26, 2013

Yeah this has made my purchase of the vagrant vmware_fusion plugin useless :(

@mitchellh Think this will this see some attention in the next release?

@mitchellh
Copy link

@tmatilai The "provision" command indeed doesn't have the ConfigValidate middleware. Almost every other command does. I just pushed v0.6.2 of the Fusion provider which fixes this. Thanks!

@tmatilai
Copy link
Contributor

I can confirm that the new version fixes the issue. :D

@mitchellh, thanks a ton! You're awesome!

@ocxo
Copy link

ocxo commented Apr 26, 2013

❤️ ❤️ ❤️

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants