fphilipe / premailer-rails

CSS styled emails without the hassle.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Broken for Rails 5.2 alpha

opened this issue · comments

As of rails/rails#30744 looks like...

Getting undefined method send_early_hints' for nil:NilClass` on the line including a stylesheet in a mailer template.

This PR rails/rails#30812 should have fixed this since we don't call it if request isn't available. Can you check and let me know?

Oh sorry 😳 I saw this linked from Rails and assumed I was on a Rails issue. I need more ☕️ Sorry for the noise.

Don't we all...

To clarify the original report, using stylesheet_link_tag with premailer-rails is the problem. I can work around for now with:

-    <%= stylesheet_link_tag "mailer" %>
+    <link rel="stylesheet" href="/assets/mailer.css">
+    <%#= stylesheet_link_tag "mailer" %>

But that gets problematic when I update the stylesheet.

It's definitely Rails issue cause it's broken w/o premailer as well for both delivery and preview.

Is it still broken with rails 5.2 final?

Looks like its been fixed in Rails here

which was one commit after Beta2 (master is ok so Beta 3 should be 👌 )

Thanks for the update. Also - looks like I wasn't paying close enough attention to inky's dependencies, and it turns out I am using the premailer-rails gem after all :)

Weird...am still getting this error.

This seems to have been resolved.