我正在尝试根据此处的文档在Windows机器上设置Laravel家园:http://laravel.com/docs/5.0/homestead#installation-and-setup。
然而,当我进入' 启动流浪者盒'当我尝试“流浪”时,我会收到以下错误:'来自cmd:
D:/Homestead/scripts/homestead.rb:4:in `configure': undefined method `[]' for false:FalseClass (NoMethodError)
from D:/Homestead/Vagrantfile:18:in `block in <top (required)>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/v2/loader.rb:37:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:103:in `block (2 levels) in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:97:in `block in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/config/loader.rb:94:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/vagrantfile.rb:28:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:691:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:691:in `vagrantfile'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:441:in `host'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:207:in `block in action_runner'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:33:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/runner.rb:33:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:428:in `hook'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/environment.rb:673:in `unload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/bin/vagrant:177:in `ensure in <main>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.7.2/bin/vagrant:177:in `<main>'
如果我使用Cygwin来提升&#39; Vagrant up&#39;相反,我得到这个错误:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'laravel/homestead' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
The box 'laravel/homestead' could not be found or
could not be accessed in the remote catalog. If this is a private
box on HashiCorp's Atlas, please verify you're logged in via
`vagrant login`. Also, please double-check the name. The expanded
URL and error message are shown below:
URL: ["https://atlas.hashicorp.com/laravel/homestead"]
Error: Could not resolve host: (nil); Host not found
我应该使用Cygwin还是cmd?
如何修复这些错误?我跑了&#39; Vagrant box&#39;在cmd中成功(指向本地.box文件,因为我在代理后面),我应该在Cygwin中运行它吗?
编辑:
好的,如果我更换&#39;〜&#39;使用&#39; C:/ Users / [username] /&#39;这使得在cmd内联运行它并在Cygwin中运行它,所以现在两者都给出了相同的错误。
答案 0 :(得分:0)
问题是我使用过
vagrant box add laravel [location]
而不是
vagrant box add laravel/homestead [location]