Hey Angshuman,

Try node.hostname instead of node.vm.hostname

HTH, Torben
Am 22.04.2015 06:55 schrieb "Angshuman Mukherjee" <am.mukher...@gmail.com>:

> I'm getting this error -
>
>
> $ vagrant up node-1
>
> /Users/angshu/mydevenv/vagrant-root/Vagrantfile:13:in `block in <top
> (required)>': undefined method ` ' for main:Object (NoMethodError)
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in
> `call'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in
> `load'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:103:in
> `block (2 levels) in load'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in
> `each'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in
> `block in load'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in
> `each'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in
> `load'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/vagrantfile.rb:28:in
> `initialize'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:691:in
> `new'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:691:in
> `vagrantfile'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:441:in
> `host'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:207:in
> `block in action_runner'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:33:in
> `call'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:33:in
> `run'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:428:in
> `hook'
>
> from
> /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:673:in
> `unload'
>
> from
> /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/bin/vagrant:177:in
> `ensure in <main>'
>
>  from
> /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/bin/vagrant:177:in
> `<main>'
>
> The Vagrantfile is as follows -
>
>
> # -*- mode: ruby -*-
>
> # # vi: set ft=ruby :
>
>
> # Vagrantfile API/syntax version. Don't touch unless you know what you're
> doing!
>
> Vagrant.require_version ">= 1.7.0"
>
> VAGRANTFILE_API_VERSION = "2"
>
>
> Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
>
>
>     config.vm.box = "ubuntu/trusty64"
>
>     config.vm.provision "shell", inline: "echo Hello"
>
>
>     config.vm.define 'node-1' do |node|   <-------------- This line is
> causing the problem
>
>         node.vm.hostname = "mynode"
>
>     end
>
> end
>
> I want to create a multi-machine file. However on my MBP (yosemite), with
> vagrant 1.7.2, I'm getting this failure. It is working without
> config.vm.define  block.
> I'm not sure what is causing this issue. Any help would be much
> appreciated.
>
> -Angshuman
>
> --
> You received this message because you are subscribed to the Google Groups
> "Vagrant" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vagrant-up+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vagrant-up+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to