Nil while creating message in ActionMailer

I have created an ActionMailer and am able to use it successfully in
development. As soon as I move it to the production environment, I am
getting an exception. It seems like it must be some kind of
configuration issue. Does any have an idea based on the stack trace?

TypeError: can’t convert nil into String
dirname' from ./script/../config/../config/../vendor/plugins/engines/lib/engines/rails_extensions/templates.rb:128:inrender’
render_message' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.2/lib/action_mailer/base.rb:424:increate!’
initialize' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/module/attribute_accessors.rb:26:innew’
from (irb):3

In my production environment the template path was not being set
correctly. It was not looking in my apps/views directory for the mail
template. I had to manually set the template root…

ActionMailer::Base.template_root = “#{RAILS_ROOT}/app/views”

Why did this work in development, but not in production?

ActionMailer::Base.template_root = “#{RAILS_ROOT}/app/views”

This still doesnt seem to be resolved if I manually set the
template_root. Where does the template_root normally get set from? Why
is the setting for template_root in development different than