Homestead virtual machine error, missing shared folder host path: ~ / Code

Iam trying to use homestead laravel seems to be some kind of problem which seems strange to me.

root@seetha-H81M-S:/home# 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: ~/Code

homestead.yaml

ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox

authorize: ~/.ssh/id_rsa.pub

keys:
- ~/.ssh/id_rsa

folders:
- map: ~/Code
  to: /home/Homestead

sites:
- map: nal.app
  to: /home/seetha/Homestead/nal/public

There is a folder called Homestead in / home / Homestead, it still seems to be working. I have similar questions in stack overflow, but nothing works for me.

Can anyone help me solve this problem. Thanks in advance.

OS Ubuntu 14.04

+4
source share
2 answers

I had the same problem and fixed it bash init.sh

Run the command bash init.shfrom the Homestead directory to create the Homestead.yaml configuration file. The Homestead.yaml file will be placed in the ~ / .homeestead hidden directory.

Homestead.yaml, bash init.sh. , "".

+7

, .

Homestead.yaml

folders:
- map: ~/Code    
  to: /home/vagrant/Code

~/Code , /home/yourUsername/Code -. Laravel.

, Code,

/home/vagrant/Code/laravelapp

/home/vagrant/Code/laravelapp2

Homestead.yaml

---
ip: "192.168.10.10"
memory: 2048
cpus: 1

authorize: ~/.ssh/id_rsa.pub

keys:
    - ~/.ssh/id_rsa

folders:
    - map: /wamp/www   
      to: /home/vagrant/Code

sites:
    - map: laravel.dev
      to: /home/vagrant/Code/laravelapp/public
    - map: laravel.dev2
      to: /home/vagrant/Code/laravelapp2/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

# blackfire:
#     - id: foo
#       token: bar
+2

All Articles