Cristian Douce
Cristian Douce

Reputation: 3208

Symfony2 app/console --env throws no envirorment name

I'm working with symfony2 and while migrating from Beta2 version to the current one I messed up with some environment configuration.

My trouble here is when I run

php app/console --env

I get the following error

[InvalidArgumentException]
The file "MyWebRoute\symfony-standard\app/config/config_.yml" does not exist.

How should I get this working? What should the proper configuration be?

Upvotes: 1

Views: 1744

Answers (1)

Raffael
Raffael

Reputation: 20045

That is b/c you have to specify your environment.

Available by default are "prod" and "dev".

So if you want to have console do something regarding your development environment you do

./console --env=dev [...]

The error message stems from console trying to load the appropriate configuration file, which is config_dev.yml for "dev" and config_prod.yml for "prod" and config_.yml for ""; but that one doesn't exist.

Upvotes: 6

Related Questions