On my application I have been successfully sending out email messages, until today. When I run the rake task or run the method mannually from the console, I get the following error:
UserMailer#admin_test: processed outbound mail in 23.6ms
ActionView::MissingTemplate: Missing template user_mailer/admin_test with "mailer". Searched in:
* "user_mailer"
This would lead me to check if there is a template, which there is in user_mailer/admin_test.html.erb
and user_mailer/admin_test.text.erb
.
My method in user_mailer.rb
is:
def admin_test(user)
@user = user
mail(to: @user.email, subject: "Text")
end
Running UserMailer.admin_test(@user).deliver_now!
(or just deliver!
) renders this error. I initially came upon it running it as a rake task from the scheduler and this error is also replicated straight up from the console.
EDIT
Here's the rest of the error message:
from /Users/xxxx/.rvm/gems/ruby-2.2.1/gems/actionmailer-4.2.1/lib/action_mailer/base.rb:915:in `each_template'
EDIT 2
Okay - so I pushed the current form to heroku and it is working in production but not in development.