6

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"

5
  • Some step by step guide here laravel.com/docs/5.0 Commented Mar 11, 2015 at 0:26
  • Sorry, forgot to mention I followed that too. Commented Mar 11, 2015 at 0:27
  • 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. Commented Mar 11, 2015 at 0:28
  • 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? Commented Mar 11, 2015 at 0:33
  • PHP >= 5.4, Mcrypt PHP Extension, OpenSSL PHP Extension, Mbstring PHP Extension, Tokenizer PHP Extension. Its all in docs... Commented Mar 11, 2015 at 7:11

2 Answers 2

4

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!

Sign up to request clarification or add additional context in comments.

1 Comment

Exactly what was needed; I should have realized.
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.