Reputation: 71
I installed fresh Symfony (with "symfony new test") on a fresh LAMP system. I'm trying to generate a bundle but it fails. The output is:
tugrul@tugrul-mint ~/tmp/test2 $ php app/console generate:bundle --namespace NV/TestdBundle --bundle-name=NVTestdBundle --dir=/home/tugrul/tmp/test2/src --format yml --structure
Welcome to the Symfony2 bundle generator
BLABLABLA
Do you confirm generation [yes]?
Bundle generation
[Twig_Error_Syntax]
An exception has been thrown during the compilation of a template ("Level "info" is not defined, use one of: 100, 200, 250, 300, 400, 500, 550, 600") in "bundle/index.html.twig.twig".
[Psr\Log\InvalidArgumentException]
Level "info" is not defined, use one of: 100, 200, 250, 300, 400, 500, 550, 600
PHP version:
$ php -v
PHP 5.5.9-1ubuntu4.13 (cli) (built: Sep 29 2015 15:24:49)
On the production server with exact same version of PHP, Symfony are successfully create a bundle, but not on the local development box.
Am I missing something? Or is there anything to be installed first to run symfony that not mentioned on the documentation?
Regards.
Upvotes: 3
Views: 833
Reputation: 71
The problem was the locale. Set it to en_US.UTF-8 and its ok now. Spent 2 days for nothing...
Upvotes: 2
Reputation: 4107
I can't reproduce this error. The following commands work for me:
$ symfony new test
$ cd test/
$ php app/console generate:bundle --namespace=NV/TestdBundle --bundle-name=NVTestdBundle --dir=src --format=yml --structure
Note that I've changed the --dir
option value to src
because I'm inside the project's directory.
If still doesn't work for you, remember that you can append -vvv
to any Symfony command to output very detailed error information.
Upvotes: 0