you have requested a non-existent service "grid"

在symfony2.0中,如果不安装DataGridBundle会出现这种错误:you have requested a non-existent service "grid"

解决方法如下

在../app/AppKernel.php 中添加

         new Sorien\DataGridBundle\SorienDataGridBundle(),

在../app/autoload.php中

$loader->registerNamespaces(array(
    'Symfony'          => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'),
    'Sensio'           => __DIR__.'/../vendor/bundles',
    'JMS'              => __DIR__.'/../vendor/bundles',
    'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
    'Doctrine\\DBAL'   => __DIR__.'/../vendor/doctrine-dbal/lib',
    'Doctrine'         => __DIR__.'/../vendor/doctrine/lib',
    'Monolog'          => __DIR__.'/../vendor/monolog/src',
    'Assetic'          => __DIR__.'/../vendor/assetic/src',
    'Metadata'         => __DIR__.'/../vendor/metadata/src',
 'Sorien'           => __DIR__.'/../vendor/bundles',
));

 

posted @ 2013-01-15 11:05  V.Wang  阅读(500)  评论(0编辑  收藏  举报