title: Symfony2 - Fatal error with Bundles
body: <p>I've got the error [Solution at the end of the question]</p>
  
  <pre><code>Fatal error: Class 'symblog\Blogger\BlogBundle\SymblogBundle' not found in
  /var/www/Symfony/app/AppKernel.php on line 20
  </code></pre>
  
  <p>I founded the question <a href="https://stackoverflow.com/questions/7585383/how-to-install-or-integrate-bundles-in-symfony2">How to install or integrate bundles in Symfony2</a>, but the solutions given didn't help me, because I already did what is suggested there. I'm following the tutorial <a href="http://tutorial.symblog.co.uk/docs/configuration-and-templating.html" rel="nofollow noreferrer">symblog.co.uk</a> except that I created at</p>
  
  <pre><code>app/config/routing.yml
  </code></pre>
  
  <p>a</p>
  
  <pre><code>*.php resource
  </code></pre>
  
  <p>Thanks in advance!</p>
  
  <p>I have to add that while registering the bundle by console I've got the error</p>
  
  <pre><code>The command was not able to configure everything automatically.
  You must do the following changes manually.
  </code></pre>
  
  <p>And the instructions:</p>
  
  <pre><code>- Edit the app/autoload.php file and register the bundle
  namespace at the top of the registerNamespaces() call:
  'symblog\Blogger\BlogBundle' =&gt; '/var/www/Symfony/blog',
  </code></pre>
  
  <p>which I followed.</p>
  
  <p>AppKernel.php</p>
  
  <pre><code>class AppKernel extends Kernel
  {
  public function registerBundles()
  {
      $bundles = array(
          //..
          new symblog\Blogger\BlogBundle\SymblogBundle(),
      );
  </code></pre>
  
  <p>/app/config/routing.yml</p>
  
  <pre><code>SymblogBundle:
  resource: "@SymblogBundle/Resources/config/routing.php"
  prefix:   /
  </code></pre>
  
  <p>As requested: /app/config/config.yml</p>
  
  <pre><code>imports:
      - { resource: parameters.ini }
      - { resource: security.yml }
  
  framework:
      #esi:             ~
      #translator:      { fallback: %locale% }
      secret:          %secret%
      charset:         UTF-8
      router:          { resource: "%kernel.root_dir%/config/routing.yml" }
      form:            true
      csrf_protection: true
      validation:      { enable_annotations: true }
      templating:      { engines: ['twig'] } #assets_version: SomeVersionScheme
      session:
          default_locale: %locale%
          auto_start:     true
  
  # Twig Configuration
  twig:
      debug:            %kernel.debug%
      strict_variables: %kernel.debug%
  
  # Assetic Configuration
  assetic:
      debug:          %kernel.debug%
      use_controller: false
      # java: /usr/bin/java
      filters:
          cssrewrite: ~
          # closure:
          #     jar: %kernel.root_dir%/java/compiler.jar
          # yui_css:
          #     jar: %kernel.root_dir%/java/yuicompressor-2.4.2.jar
  
  # Doctrine Configuration
  doctrine:
      dbal:
          driver:   %database_driver%
          host:     %database_host%
          port:     %database_port%
          dbname:   %database_name%
          user:     %database_user%
          password: %database_password%
          charset:  UTF8
  
      orm:
          auto_generate_proxy_classes: %kernel.debug%
          auto_mapping: true
  
  # Swiftmailer Configuration
  swiftmailer:
      transport: %mailer_transport%
      host:      %mailer_host%
      username:  %mailer_user%
      password:  %mailer_password%
  
  jms_security_extra:
      secure_controllers:  true
      secure_all_services: false
  </code></pre>
  
  <p>[Edit] The solution was very easy after the answer from @Clamidity that the bundles usually are located at src/Blogger/SymBlogBundle/BloggerSymBlogBundle.php</p>
  
  <p>While the configuration using the console it saked about the location of the bundle and the default was /../src but I changed to /../blog. And of course it won't work, Symfony was looking into the wrong location. What I did was to move the folders inside /blog to /src and everything went fine.</p>