私はSidekiqを使用して電子メールを非同期配信していますが、電子メールテンプレートを見つけることができないという永続的なエラーがありました。それは時々(私がテストしているときのように)動作するので一貫していません。私はテンプレートのパスと名前を指定しようとしたことがわかりました。ActionView :: MissingTemplate: "mailer"を含むsignup_mailer/welcome_messageテンプレートがありません。 * "signup_mailer"
私はHoneybadgerで受け付けておりますエラーは次のとおりです。ActionView::MissingTemplate: Missing template signup_mailer/welcome_message with "mailer". Searched in: * "signup_mailer"
あなたはwelcome_message.html.erb
というビューと同様app/views/signup_mailer/
にあるテキスト版が実際に存在していることを写真で見ることができます
app/mailers/signup_mailer.rb
class SignupMailer < ActionMailer::Base
default from: '[email protected]'
def welcome_message(company, user)
@company = company
@user = user
@web_url = root_url
mail(to: @company.email, subject: 'Welcome to CompanyCam', template_path: 'signup_mailer', template_name: 'welcome_message')
end
end
変更subject: 'Welcome to CompanyCam') ' – VKatz
これは私が元々持っていたものですが、それでも動作しませんでした。だから私は手動で情報を設定しようとしました。 – CWitty
潜在的な解決策[ここ](http://stackoverflow.com/questions/30984400/mailer-error-missing-template)があなたのために働いていますか? – AbM