开发者

Symfony2 app/console --env throws no envirorment name

开发者 https://www.devze.com 2023-04-07 18:49 出处:网络
I\'m working with symfony2 and while migrating from Beta2 version to the current one I messed up with some environment configuration.

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-sta开发者_StackOverflowndard\app/config/config_.yml" does not exist.

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消