Laravel Homestead-vm:共享文件夹的主机路径丢失:~/Code on OSX Yosemite


Laravel Homestead - vm:The host path of the shared folder is missing: ~/Code on OSX Yosemite

我安装了全新的laravel Homestead和我的Homestead。yaml看起来像这样:

ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
    - ~/.ssh/id_rsa
folders:
    - map: /srv/my_app
      to: /home/vagrant/Code
sites:
    - map: homestead.app
      to: /home/vagrant/Code/public
databases:
    - homestead

当我尝试流浪时:我得到了这个错误:

There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The host path of the shared folder is missing: ~/Code

~/代码不存在,但它被指定为yaml文件中的其他路径,看起来流浪汉把它保存在内存或其他什么地方,知道吗?

当我创建~/Code目录时,如果它工作,流浪者在上面,但代码不在那里,因为它位于其他位置,映射根本不工作,我会遇到"未指定输入文件"的问题,这是显而易见的。

您可能编辑了错误的文件。

在运行init for homes之后,会在您的主目录下创建一个本地配置文件:

~/.homestead/Homestead.yaml您需要在那里应用更改才能使其生效。