1

我试图在 Windows 7 上设置宅基地 laravel vagrant,我收到此错误:

C:/HashiCorp/Vagrant/embedded/lib/ruby/2.0.0/psych.rb:205:in `parse':
(<unknown>): mapping values are not allowed in this context at line 13
 column 9 (Psych::SyntaxError)

这是我的 yaml 文件:

authorize: C:/Users/Netanel/.ssh/id_rsa.pub

keys:
    - C:/Users/Netanel/.ssh/id_rsa

folders:
    - map:C:/projects 
      to: /home/vagrant/projects

sites:
    - map: test.com
      to: /home/vagrant/projects/test/public

variables:
    - key: APP_ENV
      value: local
4

2 回答 2

9

问题是之后的空间不足map:。你有:

folders:
    - map:C:/projects 
      to: /home/vagrant/projects

它应该是:

folders:
    - map: C:/projects 
      to: /home/vagrant/projects
于 2014-10-27T08:57:29.983 回答
1

Marcin Nabiałek 是对的,它可能是 Homestead.yaml 的问题。

就我而言,使用 Sublime,File > Save with Encoding > UTF-8 解决了这个问题

于 2015-09-26T23:34:01.063 回答