Vagrant: no implicit conversion of nil into string

Created on 3 Jun 2014  ยท  8Comments  ยท  Source: hashicorp/vagrant

Hi there! I have a brand new macbook air, running a fresh install of 10.9.2, with Vagrant 1.6.3,

When I try to run vagrant up I get:

/Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:550:in `initialize': no implicit conversion of nil into String (TypeError)
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:550:in `new'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:550:in `block in validate'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:545:in `each'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/kernel_v2/config/vm.rb:545:in `validate'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/root.rb:68:in `block in validate'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/root.rb:64:in `each'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/root.rb:64:in `validate'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/config_validate.rb:15:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:95:in `block in finalize_action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builtin/call.rb:53:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:66:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:196:in `action_raw'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:173:in `block in action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:434:in `lock'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/machine.rb:161:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/batch_action.rb:82:in `block (2 levels) in run'

Any ideas?
Thank you!

Most helpful comment

@marcelsud fixed. Sorry about that!

All 8 comments

Looks like a good bug! Can you please show me the Vagrantfile that causes this?

Oh, interesting, I seem to have discovered the issue.

Here's the Vagrantfile:
https://gist.github.com/splodingsocks/f3f6cc7349a8e9440067#file-gistfile1-rb-L37-L38

If the issue was that the highlighted lines are expecting the env variable "KATAMARI_PATH" to be set, and it's not since this is a new machine. When I commented that out, the machine began to provision without an issue.

Also, thanks for such a great tool!

@splodingsocks the link is broken to your gist

@marcelsud fixed. Sorry about that!

@marcelsud fixed. Sorry about that!

It's broken again

I still see this bug in vagrant 2.2.4

I was getting the same error when trying to issue vagrant destroy. In my case, I launched the VM by using appdata=/path/to/appdata vagrant up, so I had to make sure to add that env declaration back into the line - appdata=/path/to/appdata vagrant destroy.

I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bbaassssiiee picture bbaassssiiee  ยท  3Comments

janw-me picture janw-me  ยท  3Comments

StefanScherer picture StefanScherer  ยท  3Comments

barkingfoodog picture barkingfoodog  ยท  3Comments

OtezVikentiy picture OtezVikentiy  ยท  3Comments