Vagrant up 抛出解析错误
Vagrant up throws parse error
我正在尝试 运行 vagrant 使用 hyper 作为提供者,遵循这个 guide。
但是当我 运行 'vagrant up' 我得到以下错误:
$ vagrant up
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): found a tab character that violate intendation while scanning a plain scalar at line 21 column 7 (Psych::SyntaxError)
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in `parse_stream'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:318:in `parse'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:245:in `load'
from E:/www/Homestead/Vagrantfile:20:in `block in <top (required)>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/v2/loader.rb:37:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/v2/loader.rb:37:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:107:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:107:in `block in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:104:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:104:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/vagrantfile.rb:28:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:740:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:740:in `vagrantfile'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:486:in `host'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:208:in `block in action_runner'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/action/runner.rb:33:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/action/runner.rb:33:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:473:in `hook'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:722:in `unload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/bin/vagrant:177:in `ensure in <main>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/bin/vagrant:177:in `<main>'
E:/www/Homestead/Vagrantfile:20:in `block in' 让我有理由相信这是发生解析错误的地方。
来自 vagrantfile 的第 20 行加载 homestead.yaml:
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
这是我的homestead.yaml。
我用 http://www.yamllint.com/ 检查了它的有效性,它说它是有效的。
---
authorize: C:\Users\xxx\.sshid_rsa.pub
box: johnpbloch/homestead
cpus: 1
databases:
- homestead
folders:
-
map: ~/Code
to: /home/vagrant/Code
ip: "192.168.10.10"
keys:
- ~/.ssh/id_rsa
memory: 2048
provider: virtualbox
sites:
-
map: homestead.app
to: /home/vagrant/Code/Laravel/public
为什么会出现此错误,我该如何解决此错误?
当您看到此错误时,您应该查看 homestead.yaml 文件。有space或输入extra.
-
map: ~/Code
应该是:
- map: ~/Code
和
-
map: homestead.app
应该是:
- map: homestead.app
我正在尝试 运行 vagrant 使用 hyper 作为提供者,遵循这个 guide。 但是当我 运行 'vagrant up' 我得到以下错误:
$ vagrant up
C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in `parse': (<unknown>): found a tab character that violate intendation while scanning a plain scalar at line 21 column 7 (Psych::SyntaxError)
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:370:in `parse_stream'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:318:in `parse'
from C:/HashiCorp/Vagrant/embedded/lib/ruby/2.2.0/psych.rb:245:in `load'
from E:/www/Homestead/Vagrantfile:20:in `block in <top (required)>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/v2/loader.rb:37:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/v2/loader.rb:37:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:113:in `block (2 levels) in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:107:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:107:in `block in load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:104:in `each'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/config/loader.rb:104:in `load'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/vagrantfile.rb:28:in `initialize'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:740:in `new'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:740:in `vagrantfile'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:486:in `host'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:208:in `block in action_runner'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/action/runner.rb:33:in `call'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/action/runner.rb:33:in `run'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:473:in `hook'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/lib/vagrant/environment.rb:722:in `unload'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/bin/vagrant:177:in `ensure in <main>'
from C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.8.3/bin/vagrant:177:in `<main>'
E:/www/Homestead/Vagrantfile:20:in `block in' 让我有理由相信这是发生解析错误的地方。
来自 vagrantfile 的第 20 行加载 homestead.yaml:
Homestead.configure(config, YAML::load(File.read(homesteadYamlPath)))
这是我的homestead.yaml。 我用 http://www.yamllint.com/ 检查了它的有效性,它说它是有效的。
---
authorize: C:\Users\xxx\.sshid_rsa.pub
box: johnpbloch/homestead
cpus: 1
databases:
- homestead
folders:
-
map: ~/Code
to: /home/vagrant/Code
ip: "192.168.10.10"
keys:
- ~/.ssh/id_rsa
memory: 2048
provider: virtualbox
sites:
-
map: homestead.app
to: /home/vagrant/Code/Laravel/public
为什么会出现此错误,我该如何解决此错误?
当您看到此错误时,您应该查看 homestead.yaml 文件。有space或输入extra.
-
map: ~/Code
应该是:
- map: ~/Code
和
-
map: homestead.app
应该是:
- map: homestead.app