Laravel宅基没有映射我的代码文件夹 [英] Laravel homestead not mapping my code folder
问题描述
按照此处
我在Windows 8上具有Virtualbox 5.0.6和Vagrant 1.7.4.计算机启动正常(唯一)是,我的映射文件夹不在vm上,这意味着当我vagrant ssh
时,该目录/home/vagrant/
为空,其中没有Code
目录.这是机器启动的屏幕截图(应该继续说并映射文件夹和内容):
I have Virtualbox 5.0.6 and Vagrant 1.7.4 on windows 8. The machine boots up fine(ish) the only problem is that my mapped folder is not present on the vm, meaning when I vagrant ssh
, the directory /home/vagrant/
is empty, there is no Code
directory inside of it. This is a screenshot of the machine booting(it should keep going and saying mapping the folders and stuff):
这是我的Homestead.yaml
文件的内容
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:\Users\Khalid\.ssh\id_rsa.pub
keys:
- C:\Users\Khalid\.ssh\id_rsa
folders:
- map: D:\work
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
有人可以帮忙吗,谢谢
vagrant up --debug
的完整输出可在此处
推荐答案
sstarlight处于正确的轨道.这是路径名问题.我也是在带宅基地的Windows 8上,即使在Windows路径中,也需要使用正斜杠.
sstarlight was on the right track. It's a path name issue. I'm on windows 8 with homestead too and you need to use the forward slashes even in your windows paths.
下面应该可以解决问题!
The below should do the trick!
authorize: C:/Users/Khalid/.ssh/id_rsa.pub
keys:
- C:/Users/Khalid/.ssh/id_rsa
folders:
- map: D:/work
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
我要补充一点,在更改后,您应通过设置--provision标志设置家园,然后按照其他答案运行配置.
I would add to this that you should run the provisioning as per the other answer after you make the change by bringing your homestead up with the --provision flag set.
这篇关于Laravel宅基没有映射我的代码文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!