6
votes

I am following the Laracasts: Build your first app in laravel - episode 2. I have also went through the Laravel 5 Docs. After installing the laravel installer I run 'laravel new blog' but all it does is create an empty folder. Why is that?

My bash_profile file reads

export PATH=/Applications/MAMP/bin/php/php5.5.10/bin:$PATH
export PATH=$HOME/bin:$PATH
export PATH=$PATH:~/.composer/vendor/bin/
export PATH=$PATH:~/.composer/vendor/bin
export PATH="/usr/local/bin:$PATH"

2
Some step by step guide here laravel.com/docs/5.0 - andrew-caulfield
Sorry, forgot to mention I followed that too. - Pierce McGeough
Do you get? 'Crafting application... Application ready! Build something amazing.' When you run the command in terminal? An alternative could be to install it via Composer. - andrew-caulfield
Nope, no error. It just creates a new empty folder with the name. I am assuming that can be run from my local machine rather than in the homestead. If I try composer installer on my machine I get the error that I need mcrypt. It works ok on homestead. If I installed mcrypt would it work with laravel installer then? - Pierce McGeough
PHP >= 5.4, Mcrypt PHP Extension, OpenSSL PHP Extension, Mbstring PHP Extension, Tokenizer PHP Extension. Its all in docs... - Kyslik

2 Answers

4
votes

It happens because it is trying to use the old laravel installer installed on /usr/local/bin.

You just have to delete that with:

sudo rm /usr/local/bin/laravel

And that's all, this worked for me!

0
votes

I had the same problem. In my case (Debian 7.8)

First try to call the installer by its full path:

/home/_your_username_/.composer/vendor/bin/laravel new _your_projectname_

If it works like that then I guess you have your $PATH setup in the wrong order.
I first had installed laravel 4 installer in /usr/local/bin/laravel following this instructions http://laravel.com/docs/4.1

Then I installed the new laravel 5 installer following this instructions: http://laravel.com/docs/5.0

So the problem was, because I used

export PATH="$PATH:~/.composer/vendor/bin"

to add the binary to my $PATH it was placed at the end of the list and the old installer was found first. Use

export PATH="~/.composer/vendor/bin:$PATH"

instead, so it gets added in front of /usr/local/bin/ Then it should work.