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?>> RegistrationMailer.create_confirm(reg)TypeError: can''t convert nil into String from ./script/../config/../config/../vendor/plugins/engines/lib/engines/rails_extensions/templates.rb:128:in `dirname'' from ./script/../config/../config/../vendor/plugins/engines/lib/engines/rails_extensions/templates.rb:128:in `render'' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.2/lib/action_mailer/base.rb:476:in `render_message'' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.2/lib/action_mailer/base.rb:424:in `create!'' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.2/lib/action_mailer/base.rb:385:in `initialize'' from /usr/lib/ruby/gems/1.8/gems/activesupport-1.4.1/lib/active_support/core_ext/module/attribute_accessors.rb:26:in `new'' from /usr/lib/ruby/gems/1.8/gems/actionmailer-1.3.2/lib/action_mailer/base.rb:332:in `method_missing'' from (irb):3 -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> > 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 production? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---