BerlinVagrant / vagrant-dns

A plugin to manage DNS records for vagrant environments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: configurator.rb:45:in `register_patterns!': undefined method `last' for {}:Hash

mattes opened this issue · comments

commented

I get the following error...

/Users/matthias/.vagrant.d/gems/gems/vagrant-dns-0.4.0/lib/vagrant-dns/configurator.rb:45:in `register_patterns!': undefined method `last' for {}:Hash (NoMethodError)
    from /Users/matthias/.vagrant.d/gems/gems/vagrant-dns-0.4.0/lib/vagrant-dns/configurator.rb:16:in `run!'
    from /Users/matthias/.vagrant.d/gems/gems/vagrant-dns-0.4.0/lib/vagrant-dns/restart_middleware.rb:13:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builtin/call.rb:57:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/providers/virtualbox/action/check_virtualbox.rb:17:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/warden.rb:34:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/builder.rb:116:in `call'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `block in run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/util/busy.rb:19:in `busy'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/action/runner.rb:61:in `run'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/machine.rb:147:in `action'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/reload/command.rb:29:in `block in execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/plugin/v2/command.rb:182:in `block in with_target_vms'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/plugin/v2/command.rb:180:in `each'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/plugin/v2/command.rb:180:in `with_target_vms'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/plugins/commands/reload/command.rb:28:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/cli.rb:46:in `execute'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/lib/vagrant/environment.rb:467:in `cli'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.2.2/bin/vagrant:84:in `<top (required)>'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `load'
    from /Applications/Vagrant/bin/../embedded/gems/bin/vagrant:23:in `<main>'
$ vagrant -v
Vagrant version 1.2.2

$ ruby -v
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-darwin12.3.0]

@mattes If you add a line such as:
config.vm.network :private_network, ip: "192.168.50.4"

It will get you past the error. I'm fairly new to this gem, but I'm going to see if I can quickly figure out what's going on and submit a patch.

Cheers!

commented

@bryanthompson sorry, i should have mentioned that i wanted to use it with config.vm.network :public_network.

Same issue here, and using config.vm.network :public_network as well.