title: Heroku rake task not loading ActionMailer class
body: <p>I have a rake task that delivers daily emails via ActionMailer. My plan is to use Heroku's cron job to run this task nightly. </p>
  
  <p>The problem is that my ActionMailer class (Notifier) is not recognized with Heroku. The specific error is "Unitialized constant Notifier." However, the Notifier class properly sends out emails in Heroku everywhere else in the application (controllers and models) but not from the rake task. Running the rake task also <em>does</em> work locally. </p>
  
  <p>If I do heroku rake cron to run the task manually, it throws that error. </p>
  
  <pre><code>heroku rake cron
  </code></pre>
  
  <p>This doesn't work. However, </p>
  
  <pre><code>rake RAILS_ENV=production cron
  </code></pre>
  
  <p>works fine (Heroku vs. local). </p>
  
  <p>I've even tried adding my mailer path to the autoload directory. </p>