title: Symfony2 bundle not registering
body: <p>I created a new bundle with app/console. Trying to get a simple hello printed, so I can move on. I autoloaded the namespace, registered the bundle, created a page but Symfony detects an exception:</p>
  
  <pre><code>Bundle "PageBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your AppKernel.php file?
  </code></pre>
  
  <p>But I have already done that.</p>
  
  <p>The log shows:</p>
  
  <pre><code>[2011-06-08 23:41:56] request.CRITICAL: InvalidArgumentException: Bundle "PageBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() function of your AppKernel.php file? (uncaught exception) at /Applications/MAMP/htdocs/Symfony/app/bootstrap.php.cache line 634 
  </code></pre>
  
  <p>I also cleared the cached dev folder. Can anyone help me figure out whats wrong. I have done this before, it's the first time I'm having this problem. Something to do with bootstrap.php.cache</p>
  
  <p>Thanks! Appreciate all the help.</p>
  
  <p>CODE:</p>
  
  <pre><code>public function registerBundles()
  {
      $bundles = array(
          new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
          new Symfony\Bundle\SecurityBundle\SecurityBundle(),
          new Symfony\Bundle\TwigBundle\TwigBundle(),
          new Symfony\Bundle\MonologBundle\MonologBundle(),
          new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
          new Symfony\Bundle\DoctrineBundle\DoctrineBundle(),
          new Symfony\Bundle\AsseticBundle\AsseticBundle(),
          new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
          new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(),
      );
  
      if (in_array($this-&gt;getEnvironment(), array('dev', 'test'))) {
          $bundles[] = new Webmuch\PageBundle\WebmuchPageBundle();
          $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
          $bundles[] = new Symfony\Bundle\WebConfiguratorBundle\SymfonyWebConfiguratorBundle();
      }
  
      return $bundles;
  }
  </code></pre>
  
  <p>The bundle also shows as an active bundle in the profiler.</p>