1

I am trying to use laravel 5.1 on Windows Server 2008 R2.

I following the documentation when I try to create a new project like this

laravel new blog

I get the following

Crafting application...
Could not open input file: composer.phar
Application ready! Build something amazing.

where is it looking for composer.phar so I can move it to the correct place?

Additionally when I issue the same command again

laravel new blog

I get this other issue

  [RuntimeException]
  Application already exists!



new <name>

What do I need to do to correctly create a new project?

Thank you

4
  • have you installed composer ? Commented Jul 22, 2015 at 20:42
  • yes using the windows installer. I also did this command after composer global require "laravel/installer=~1.1" Commented Jul 22, 2015 at 20:44
  • I just executed this command composer create-project laravel/laravel --prefer-dist and now I am able to go to example.com/laravel/public` did I do it correct? and if I want to create another project do I execute the same command? Commented Jul 22, 2015 at 20:50
  • 1
    Yes, composer create-project laravel/laravel is correct, you can also do composer create-project laravel/laravel mydir. Commented Jul 22, 2015 at 20:59

2 Answers 2

3

first, delete the blog folder that was generated. then do

composer create-project laravel/laravel blog --prefer-dist

or

composer.phar create-project laravel/laravel blog --prefer-dist

it's just an alternative of laravel new blog. I have the same error as yours so i just use the other command with same result.

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

Comments

0

Oh the Laravel documentation... What fond memories...

First, you should try listing the directory and this might open up to what's going on a little better. What you will find is that 'laravel new blog' creates a directory called 'blog' and tries to copy all of the laravel 'boilerplate' so that you are ready to start working. However, Laravel uses Composer in order to handle dependencies, which is why you are seeing this error.

One solution is to add composer.phar to your path. How to do this will depend on your system, but it should be reasonably well-documented. I'm not familiar with Windows Server 2008, so I can't help there.

Another option is to have composer.phar in the directory that you are running 'laravel new blog' on. I can't test this right now, but i'm pretty confident that is where it looks if it doesn't find it in the path. So for example:

directory structure:
www
-->composer.phar

After running 'laravel new blog'

www
-->composter.phar
-->blog

It sounds like you'll need to remove the blog directory before running 'laravel new ...' again because you've already ran it once.

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.