2014-06-06 4 views
1

Jeffery Way 자습서를 기반으로 기본 Vagrant 인스턴스를 설정하려고합니다.Vagrant : undefined method 'box_url ='

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

VAGRANTFILE_API_VERSION = "2" 

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| 

    config.vm.box = "precise32" 
    config.vm.box.box_url = "http://files.vagrantup.com/precise32.box" 

end 

구글 : 나는 지금까지 초기화 방랑 실행하고 은 다음과 같이 할 수있는 'Vagrantfile'수정했을

../Vagrantfile:9:in `block in <top (required)>': undefined method `box_url=' for "precise32":String (NoMethodError) 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/loader.rb:37:in `call' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/v2/loader.rb:37:in `load' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:103:in `block (2 levels) in load' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:97:in `each' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:97:in `block in load' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:94:in `each' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/config/loader.rb:94:in `load' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/vagrantfile.rb:28:in `initialize' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:574:in `new' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:574:in `vagrantfile' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:359:in `host' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:168:in `block in action_runner' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:33:in `call' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/action/runner.rb:33:in `run' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:346:in `hook' 
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.6.3/lib/vagrant/environment.rb:556:in `unload' 
    from /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant:169:in `ensure in <main>' 
    from /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.6.3/bin/vagrant:169:in `<main>' 

유일한 일을 : 나는 방랑을 실행할 때이 오류가 무엇입니까 "정의되지 않은 메소드"에 대해 아무 것도 말하지 않습니다. box_url = ' "... 어떤 도움도 크게 받으실 수 있습니다.

답변

1

잘못된 구문을 사용하고 있습니다! 이럴 필요가있어.

config.vm.box = "precise32" 
config.vm.box_url = "http://files.vagrantup.com/precise32.box"