title: Symfony2:: Fatal error: Class 'Swift_Mailer' not found in cache/dev/appDevDebugProjectContainer.php on line 1331
body: <p>I installed symfony2 and FOSUserBundle. Both are working correctly, however when I access the registration page of FOSUserBundle, which is using SwiftMailer as for email confirmation I get the following error instantly. </p>
  
  <pre><code>Fatal error: Class 'Swift_Mailer' not found in /home/public_html/cache/dev/appDevDebugProjectContainer.php on line 1331
  </code></pre>
  
  <p>Line 1331 has the following code:</p>
  
  <pre><code>return $this-&gt;services['mailer'] = new \Swift_Mailer($this-&gt;get('swiftmailer.transport'));
  </code></pre>
  
  <p>In the debug information, I see SwiftMailerBundle is correctly loaded. Now I'm stuck, I have been struggling with this for quite some time and I'm not familiar with Symfony just yet. Pretty sure it's my shortcoming, but a pair of fresh eyes will help. Am I missing something, is this something configurable? The Swift\Mailer class is actually on the server, located under vendor/swiftmailer/swiftmailer/lib/classes/swift/mailer.php</p>
  
  <p>anyone can help with this? Thanks a lot!</p>