-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't find asset "/stylesheets/email.css" #42
Comments
Thank you for an excellent issue report. Are you precompiling your assets in production? Your view doesn't seem to pick up on this fact. Maybe you haven't run the precompilation on the machine that handles your background jobs? Your asset URL also seem to be non-standard. The filesystem provider automatically tries to remove You could try to manually add a new filesystem provider with a prefix that matches your case (See documentation for the method signatures). Does that work like it should? |
Thanks for your response.
This might be true (investigation below), I'm checking now how our other apps handle this situation. Precompiled?This file should be precompiled: config.assets.precompile += [
"email.css",
# ...
] And it seems like it is precompoiled. We have a mail preview on Production that uses the correct URL: However, in a Rails console, the include ActionView::Helpers::AssetTagHelper
stylesheet_link_tag("email")
# => "<link rel=\"stylesheet\" media=\"screen\" href=\"/stylesheets/email.css\" />" It's gotta be something to do with the environment ... hummm... ! |
Also, it's clear that the file is really there:
|
SolutionJust make the doctype html
html
head
link rel='stylesheet' type='text/css' href='/assets/email.css' I saw that our other apps do this (for some other CSS inlining gem) and it was a workaround on this issue I wish I could have found the "real" issue, sure seems like something about my environment ... but I have to get this show on the road! Thanks again for your help and for your work on this project! |
Thanks for all your great work on this project! It's worked like a charm for the last 8 months, just hitting some issue since upgrading to Rails 4.2.
I see some issues about Rails 4.2 + "CssNotFound" regarding asset hashes, but I think I have a different problem.
Setup
I'm using:
roadie_options
.I have a stylesheet in
/app/assets/stylesheets/email.css.sass
.I have in
/app/views/layouts/email.html.slim
:For mailers, I have ApplicationMailer:
then the concrete mailer:
But I'm getting this error:
In the console
If I open a production console, I can confirm that the stylesheet isn't found:
Raw Stack Trace
??
Do you have any suggestions on how I can find out more info? I'm not sure where to look next!
Thanks for you help!
The text was updated successfully, but these errors were encountered: