0

Being new to Laravel, I am following a couple of tutorials.

I could go through the first one covering the basics almost with no issue, using only the AMP environment built in Mac OSX Mavericks.

I am now moving on to a more complex one to learn how to create an app from A to Z, and this one requires Homestead, that I have been able to install and setup.

If I try to create a Laravel App with the composer command, it works just fine.

However, as soon as I try to create an app with the laravel new command, I get the following error message:

-bash: laravel: command not found

I have read many answers to similar questions, but none of these seem to fix my problem, because:

  • I do have mcrypt installed
  • I tried the sudo chmod +x /usr/local/bin/laravelto give execute permission to the folder
  • and Laravel is working on my computer, since I have already created a couple of apps.

So, why can't I use the larval new command? Do I need to update/install something else?

I can provide you with additional information/code/logs if necessary.

[EDIT]: I found the answer to my own question. The solution was simply to place the ~/.composer/vendor/bin directory in the PATH with the following export PATH="~/.composer/vendor/bin:$PATH"command in Terminal, as explained here: https://laracasts.com/discuss/channels/general-discussion/trying-to-make-use-of-the-laravel-installer .

7
  • Just edited the question explaining why the existing answers to not fully address the problem. Commented Oct 16, 2014 at 17:20
  • You read laravel.com/docs/4.2/quick#installation , don't you? Commented Oct 16, 2014 at 17:24
  • Yes @MarcinNabiałek I did, but did not find any solution to my problem. Commented Oct 16, 2014 at 21:26
  • @ThibaudClement you should add an actual answer with your solution so the question is marked as solved Commented Feb 11, 2016 at 14:32
  • @AndHeiberg I can't, the question was marked as duplicate, and already points to another answer. But thanks for your comment. Commented Feb 11, 2016 at 15:12

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.