Could not open input file: app/console (Symfony 2)

Giesburts picture Giesburts · Dec 2, 2015 · Viewed 9.5k times · Source

Recently I started working with Symfony2. Unfortunately the php app/console commands doesn't work at both my MAMP server as Vagrant server (MAC OSX). I tried to make a bundle with the following command

php app/console generate:bundle --namespace=Vendor/NameBundle

and also tried to fix a problem with

php app/console assets:install web

And both commands returned the following in my terminal:

Could not open input file: app/console

Does someone know how to fix this problem? I AM working at my project directory like: mac/applications/mamp/htdocs/project but it is still not working. I also tried to reinstall a new symfony project but that was not a fix. I guess my php isn't working at all in my terminal...

Answer

Giesburts picture Giesburts · Dec 9, 2015

So the problem was the version number. Symfony version 3.0 is available now so if you're do not selecting a version number at your project install it will automaticly install version 3.0 instead of 2.7. The new command is:

$ php bin/console generate:bundle --namespace=Vendor/NameBundle

instead of

$ php app/console generate:bundle --namespace=Vendor/NameBundle