bash homestead command not found Following the Homestead setup on a new mac, I'm stuck at the following step:
$ homestead up
-bash: homestead: command not found
I have set up everything in the steps before that successfully I think. I have a .homestead folder inside my use root folder. Inside that there is the Homestead.yaml file which I configured like the docs told me to.
I also have a ~/code/Homestead folder
I also created a .bash_profile file with:
PATH=~/.composer/vendor/bin:PATH
So how and where do I start up homestead? I guess there's something not right with a path somewhere. But I have no clue.
@Mattiman hmm I think you are missing a '$' in your exported path:
export PATH=~/.composer/vendor/bin:$PATH
Usman.
Sorry that was a typo in my forum post here. In the .bash_profile itself it is exactly like you have written.
Should I do something else with that .bash_profile file? Run it?
No, you don't need to run it Mac's Terminal automatically runs it for new terminal window.
@Mattiman can you show me the output of the :
echo $PATH;
@usman that is:
/Users/mattiman/.composer/vendor/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
@usman I'm running Terminal on OS X.
On my other mac I use that as well. On my new Mac (running Yosemite) it doesn't work.
One difference I see is that on the mac where it works I have identical Homestead.yaml files both in:
.homestead/Homestead.yaml
/code/Homestead/Homestead.yaml
While on the new mac where it doesn't work I have only one:
.homestead/Homestead.yaml
Would that make a difference?
Thanks for the help by the way!
Are you able to run the homestead using the full path i.e. ~/.composer/vendor/bin/homestead ?
There is no vendor/bin/homestead folder and file. So running this gives an error:
$ ~/.composer/vendor/bin/homestead up
-bash: /Users/mattiman/.composer/vendor/bin/homestead: No such file or directory
You need to install it first, use this command:
composer global require "laravel/homestead=~2.0"
I hope after this you will be able to access the homestead command because your path is correct.
Aha now it's doing something! After running your command it installed something in .composer/ and after that I could run homestead up!
I was confused because in the docs there are 2 options:
Option 1 - Manually Via Git (No Local PHP)
[...]
Option 2 - With Composer + PHP Tool
[...]
I did the first one. But that is not complete so it seems.
I have this in my .zshrc file
export PATH=/usr/local/php5/bin:$PATH:~/.composer/vendor/bin:~/.composer/vendor/symfony
The 'composer' entries are the ones you need in your path I believe
can someone explain what this is export PATH=~/.composer/vendor/bin:$PATH
Please sign in or create an account to participate in this conversation.