You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a weird one (sorry). Adding the Maildown gem breaks local email delivery into tmp/mails. Removing the gem and they start saving again. It doesn't cause any issues in production, and the dev /rails/mailers preview works fine. So real email sending and rendering is fine, but local delivery breaks.
The only monkeypatch Maildown does to Rails is in lib/maildown/ext/action_mailer.rb and that's only 17 LOC. So I went through commenting and uncommenting bits of that file until I found the culprit is line 3
Which is weird as that barely does anything. The method view_context_class is included from several files deep with Rails and has some funky stuff in it like an anonymous class. But maybe the issue is nothing to do with that method; could it be a load order / autoloading thing?
I'm at a bit of a loss, any thoughts?
The text was updated successfully, but these errors were encountered:
I found a way to make it work. Simply add config for file_settings. I don't know why it isn't needed without Maildown, then adding Maildown breaks file delivery until that config is added. I don't see any Maildown code that should interfere so it seems it might be a bug in Rails, easy to work around anyway so closing issue.
config/environments/development.rb
config.action_mailer.delivery_method=:file# config.action_mailer.perform_deliveries = true # not needed it seemsconfig.action_mailer.file_settings={location: Rails.root.join("tmp/mails")}
This is a weird one (sorry). Adding the Maildown gem breaks local email delivery into
tmp/mails
. Removing the gem and they start saving again. It doesn't cause any issues in production, and the dev/rails/mailers
preview works fine. So real email sending and rendering is fine, but local delivery breaks.The only monkeypatch Maildown does to Rails is in lib/maildown/ext/action_mailer.rb and that's only 17 LOC. So I went through commenting and uncommenting bits of that file until I found the culprit is line 3
Which is weird as that barely does anything. The method
view_context_class
is included from several files deep with Rails and has some funky stuff in it like an anonymous class. But maybe the issue is nothing to do with that method; could it be a load order / autoloading thing?I'm at a bit of a loss, any thoughts?
The text was updated successfully, but these errors were encountered: