0

I am trying to get Laravel running on a Virtual Machine on my Imac running Yosemite. I have already set up my VM on my Macbook but for some reason I am having trouble getting the virtual machine working on my Imac. I believe I have all the directory paths correct but when I ssh into the VM none of my directories show up. I believe it is something to do with my directory paths but I have them routed exactly as I do on my Macbook and it still doesn't seem to work. I also get these two errors when I run "vagrant up" but from what Ive researched that shouldn't be the issue.

/opt/vagrant/bin/../embedded/gems/gems/vagrant-1.7.2/lib/vagrant/pre-rubygems.rb:31: 
warning: Insecure world writable dir /Users/tylerfoulkes in PATH, mode 040777

/opt/vagrant/embedded/gems/gems/bundler-1.7.11/lib/bundler/runtime.rb:222: warning: Insecure world writable dir   
/Users/tylerfoulkes in PATH, mode 040777

Homestead.yaml file

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

authorize: ~/.ssh/id_rsa.pub

keys:
- ~/.ssh/id_rsa

folders:
    - map: /Users/username/laravel
      to: /home/vagrant/Code

sites:
    - map: learn.app
      to: /home/vagrant/Code/laravel/public

databases:
    - homestead

variables:
    - key: APP_ENV
      value: local

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

hosts file

## 
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
## 
127.0.0.1       localhost
255.255.255.255 broadcasthost
::1             localhost
fe80::1%lo0     localhost
127.0.0.1       learn.app
Tyler
  • 73
  • 2
  • 11
  • `folders: - map: /Users/username/laravel to: /home/vagrant/Code` Maybe you should change that to your own username. – Amar Syla Apr 12 '15 at 19:21
  • @AmarSyla I have that set as my username, I just used username as a general placeholder. – Tyler Apr 12 '15 at 19:25

1 Answers1

0

Your sites folder should point to /home/vagrant/Code/public not /home/vagrant/Code/laravel/public because youare mapping the laravel folder on to Code not in to a sub directory.

folders:
    - map: /Users/username/laravel
      to: /home/vagrant/Code
sites:
    - map: learn.app
      to: /home/vagrant/Code/public

Or if you want laravel in a sub directory

folders:
    - map: /Users/username/laravel
      to: /home/vagrant/Code/laravel

sites:
    - map: learn.app
      to: /home/vagrant/Code/laravel/public

Unless of course the laravel directory contains a bunch of different laravel projects in which case it would look more like...

folders:
    - map: /Users/username/laravel
      to: /home/vagrant/Code

sites:
    - map: project.app
      to: /home/vagrant/Code/project/public
    - map: project2.app
      to: /home/vagrant/Code/project2/public
AndyBeeSee
  • 206
  • 1
  • 2