Soj*_*ose 13 vagrant laravel homestead
我正试图在我的Windows 7机器上设置laravel宅基地.我安装了vagrant和virtualbox.还有git bash shell.
没有
vagrant box add laravel/homestead
composer global require "laravel/homestead=~2.0"
Run Code Online (Sandbox Code Playgroud)
将composer vendor bin添加到环境变量中.因此,现在可以从shell访问homestead命令
homestead init
Run Code Online (Sandbox Code Playgroud)
我编辑了我的Homestead.yaml文件,这是配置.
我的laravel项目目前在配置中提到的目录中.即(E://)目录
folders:
- map: /e/Projects/Code/apache/laravel
to: /home/vagrant/Projects
sites:
- map: foober.dev
to: /home/vagrant/Projects/foober/public
Run Code Online (Sandbox Code Playgroud)
现在每当我这样做homestead up,我都会收到错误
Bringing machine 'default' up with 'virtualbox' provider...
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: /e/Projects/Code/apache/laravel
Run Code Online (Sandbox Code Playgroud)
我已经确定这cd /e/Projects/Code/apache/laravel是有效的.我不确定我在这里缺少什么.必须是愚蠢的,但任何帮助都会受到赞赏.
Set*_*Lar 21
错误很简单.它在告诉你
The host path of the shared folder is missing: /e/Projects/Code/apache/laravel
Run Code Online (Sandbox Code Playgroud)
您的共享文件夹丢失了.根据你的问题.你正在使用窗口.所以,窗口不应该像
cd /e/Projects/Code/apache/laravel
Run Code Online (Sandbox Code Playgroud)
应该是这样的YourPartitionName:/Yourdirectory.
例:
folders:
- map: E:/Projects/Code/apache/laravel
to: /home/vagrant/Projects
Run Code Online (Sandbox Code Playgroud)