11

We're running a Rails 3.0.7 app with Passenger standalone + nginx and with ruby 1.9.2-p290, and we're seeing the strangest thing happen: After deploying some updates to a mailer template, new mails coming from the app sometimes have the updates applied, and sometimes the old template is being used.

I can't find anything about cached ActiomMailer templates online, and running rake tmp:cache:clear does not address the issue either, fwiw.

Has anyone ever experienced such a thing? Is there a definitive solution for this problem?

thanks,

Jacob

trisignia
  • 1,173
  • 1
  • 10
  • 19

2 Answers2

1

I've run into similar situations in our application, and we use Resque.

If I'm changing anything regarding mailers (which the Resque workers handle), I need to restart the workers.

Kill the workers and respawn them, it sounds like some of them might have the old environment loaded and others do not.

Tass
  • 1,628
  • 16
  • 28
0

I was having this issue as well, although I wasn't using Resque to send mail. After staring at the offending templates for a while, I realized some of my inline CSS was incorrectly formatted (improper font-family and padding declarations) and that the template may have been ignoring everything else next to those declarations. As a result, it looked like it was pulling the old templates rather than rendering the new rules. Not sure if this is documented anywhere..

So, basically, I was lazy and it cost me a few hours of the day.

maxhs
  • 868
  • 2
  • 10
  • 14