Running 'vagrant up' generates an error - laravel

ERROR MESSAGE
I've been following the steps here
After editing, my homestead.yaml now looks like:
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: C:/Users/User/.ssh/id_rsa.pub
keys:
C:/Users/User/.ssh/id_rsa
folders:
- map: D:/homestead/dev.todoparrot.com
to: /home/vagrant/Code
sites:
- map: dev.todoparrot.com
to: /home/vagrant/Code/dev.todoparrot.com/public
databases:
- homestead
I generated the key with Git Gui and it put it into C:/Users/User/.ssh/ automatically. I left it as is.
I created the folders: map: directory manually (D:/homestead/dev.todoparrot.com). It's empty.
Then, I ran Power Shell inside the Homestead folder (C:/Users/User/) (the main Homestead folder with homestead.yaml and other files inside).
I typed "vagrant up" into Power Shell and got this error (link at the very top). What am I doing wrong?

Under keys, you're missing a - before the path:
keys:
- C:/Users/User/.ssh/id_rsa

Related

vagrant homestead directory missing

when I run command ls it doesn't show any file.
My homestead.yaml file:
which directory should i look in to check.
There's seems to be some issues with homestead lately for windows folk.
to make sure you can access your files in the VM just add the following in your Vagrantfile
config.vm.synced_folder "C:/Users/<User>/projects", "/home/vagrant/Code"
Try to provision the Vagrant VM
vagrant reload --provision
I paste my Homestead.yaml file. You are in Windows, so try to put your complete local folder (C:\Users\my_user\development in my machine) and provision the machine another time
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\Users\my_user\development
to: /home/vagrant/Code
sites:
- map: my_site.app
to: /home/vagrant/Code/web/my_site/public
databases:
- my_database

No input file specified; I get this when i try to launch my web site into my browser

Im trying to launch my website on my local host but every time i time the domain (Whoodie.dev:8000)into my browser I get "no input file specified" on my screen.
This is my homestead.yaml file I think thats were the problem lay. Can anybody help me or point me in the right direction?
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/www
to: /home/vagrant/www
sites:
- map: Whoodie.dev
to: /home/vagrant/Code/www/Laravel/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
It sounds like nginx is struggling to find the location that you've told it to load from.
If you vagrant ssh into the box and run cd /home/vagrant/Code/www/Laravel/public does it exist?
If not, assuming your folder structure inside ~/www is actually ~/www/Code/Laravel/public then your mapping should be:
sites: - map: Whoodie.dev to: /home/vagrant/www/Code/Laravel/public
Try changing that then run vagrant provision and see if that helps.

Adjusting Homestead Settings for Two Separate Projects and VMs

This is a question related to setting up Homestead for my two Laravel projects.
I currently have a Laravel project under this file directory Code/laravel. Within /laravel/ is where my first project's file resides (so my app folders.. storage folders.. et cetera).
My Homestead.yaml file is currently set up in this way:
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/vagrant/Code
sites:
- map: localhost
to: /home/vagrant/Code/Laravel/public
So when I run vagrant up, my host file which mapped that IP address to the URL app.dev would show my Code/laravel/public folder's pages.
However, I am currently in the process of setting up a NEW project.
This new project goes under Code/schedulizer (where schedulizer is the name of the new project).
How would I change my Homestead settings to add the second project?
tl;dr: So to summarize, I have two SEPARATE projects under /Code/. My current Homestead settings is only configured for the project under Code/laravel and not Code/schedulizer. I want to have a VM for each project. What should I change my Homestead.yaml settings to?
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code // This is all your projects folder
to: /home/vagrant/Code // Will be placed here on homestead
sites:
- map: laravel.app // Laravel project domain
to: /home/vagrant/Code/laravel/public // Path to your public folder for laravel project
- map: schedulizer.app // Schedulizer project domain
to: /home/vagrant/Code/schedulizer/public // Path to your public folder for schedulizer project
After Homestead.yaml configuration need to run vagrant reload --provision
You cant find more detailed info here.

Homestead virtualbox error, the host path of the shared folder is missing: ~/Code

Iam trying to use homestead laravel, seems some issue that am feeling strange.
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 named Homestead in /home/Homestead , still seems not working.
I have find similar questions in stack-overflow but nothing seems working for me.
Can anyone help me to solve this issue.
Thanks in advance.
OS Ubuntu 14.04
I had the same problem and fixed it by bash init.sh
Run the bash init.sh command from the Homestead directory to create the Homestead.yaml configuration file. The Homestead.yaml file will be placed in the ~/.homestead hidden directory.
If you are changing Homestead.yaml again, you have to re-run bash init.sh again. It will ask for overwrite, say yes.
You have this issue when your folders are not properly mapped.
This is how to map your folders in vagrant Homestead.yaml
folders:
- map: ~/Code
to: /home/vagrant/Code
~/Code means /home/yourUsername/Code must exist in your host computer.
The code folder will house all your Laravel apps.
Example you could have the following apps in Code folder which are on your host
/home/vagrant/Code/laravelapp
/home/vagrant/Code/laravelapp2
Homestead.yaml may now look like this
---
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

The host path of the shared folder is missing: ~/Code

I'd like to use laravel homestead for my development machine and installed virtualbox and vagrant successfully, but when I run vagrant up I get this error:
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
The Homestead.yaml file looks like this:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
hhvm: true
databases:
- homestead
variables:
- key: APP_ENV
value: local
These are the default settings, but they don't really work for my machine - I don't even have /home/vagrant folder nor do I have ~/Code anywhere where I can see. I'm using ubuntu 12.04 - can you please point me to how I should configure my settings because by the official documentation I'm kind of lost.
Inside the homestead directory, you have to run the command bash init.sh.
This will generate the Homestead.yaml file (and after.sh and aliases) inside your home directory (~).
If you are changing Homestead.yaml again, you have to re-run bash init.sh again. It will ask for overwrite, say yes.
(and as mentioned in other answers, be sure that the directory for folders: - map: exists)
In your Ubuntu machine you have to let Homestead know where your actual code is located. Example:
If you code is located in a seperate partition called WORKSPACE you need to type the following:
- map: /Volumes/WORKSPACE/YourProject
to: /home/vagrant/Code
In Windows case I used this:
- map: e:/GIT/PHP/mathmaps/Code
to: /home/vagrant/Code
P.S. GIT is my workspace folder
running bash init.sh a second time will prompt to overwrite the initial setup, this will also output the directory path you require to edit the correct Homestead.yaml file.
The map: attribute has to be set to the location to where you want to keep your code. For example, I will be saving my code in a folder called code within the Homestead folder therefore, map is:
folders:
- map: ~/Development/Homestead/Code
to: /home/vagrant/Code
Where 'Development' is simply a folder in my home directory where I keep all my code

Resources