I am setting up Homestead on my Windows OS and continually get this error:
==> default: /vagrant/scripts/serve.sh: line 2: $'\r': command not found
==> default: /vagrant/scripts/serve.sh: line 38: $'\r': command not found
==> default: Usage: nginx {start|stop|restart|reload|force-reload|status|configtest|rotate|upgrade}
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell "restbox.app" "/home/vagrant/Code/Laravel/public"
Stdout from the command:
Stderr from the command:
/vagrant/scripts/serve.sh: line 2: $'\r': command not found
/vagrant/scripts/serve.sh: line 38: $'\r': command not found
My YAML file looks like:
---
authorize: C:/VM/Homestead/homestead.pub
keys:
- C:/VM/Homestead/homestead.pub
folders:
- map: C:/VM/Laravel
to: /home/vagrant/Code/
sites:
- map: restbox.app
to: /home/vagrant/Code/Laravel/public
It seems to correctly parse the pub file, but I believe it screws up when parsing the folder mapping section. I have a C:/VM/Homestead directory and a C:/VM/Laravel directory with a fresh install. Anyone know what this could be?
I haven't touched the serve.sh file. I have destroyed and re-upped a few times to no avail.
The problem is your file endings:
citricsquid said:
==> default: /vagrant/scripts/serve.sh: line 2: $'\r': command not found
This is a line ending problem. You're using windows, I presume? You need to make sure your editor saves all files with the linux line ending, not the windows line ending. The windows line ending causes problems with Vagrant.
http://laravel.io/forum/05-17-2014-laravel-homestead-error#reply-7090
Thank you @citricsquid and @mvtenorio, I was able to provision the machine, I am almost there. But now I have the issue when I navigate to: http://restbox.app:8000/ it gives me a blank white screen with: No input file specified.
EDIT: Changed the Key in YAML to exclude .pub
---
authorize: C:/VM/Homestead/homestead.pub
keys:
- C:/VM/Homestead/homestead
folders:
- map: C:/VM/Laravel
to: /home/vagrant/restbox
sites:
- map: restbox.app
to: /home/vagrant/restbox/public
EDIT2: Then had to edit the sites-enabled in nginx, to get the path to the VM right, works now. Thanks for the help fellas!
And how do you change the "sites-enabled"?
I have VirtualBox, Vagrant running. Homestead is "installed" or whatever. But all I get is "No input file specified."
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community