Fork me on GitHub
Production Hacks

ActionMailer MissingTemplate error in Rails 2.3

July 20th 2010

In Rails 2.3, if you’re using implicit multipart emails for your ActionMailer views (the content type is part of the file name), ActionMailer will have problems locating the correct template during tests and background jobs. I ran into this problem when setting up background emailing with resque_mailer.

ActionView::MissingTemplate: Missing template my_mailer/mailer_action.erb in view path app/views

This is a known and documented bug, but the patch went in after the 2.3.5 release. Adding the following code to a Rails initializer should fix the problem:

blog comments powered by Disqus