Hello guys,
i am successfully using
<%= wicked_pdf_stylesheet_link_tag "pdf" %>
in development to load my asset. However in production this won't work anymore, and i can't really understand why.
Also opened a stackoverflow issue: http://stackoverflow.com/questions/36354174/including-css-files-in-pdf-using-wicked-pdf-helpers
hey @unixmonkey what do you think about the issue above?
The problem is that in production on rails 4.2 the helper above do not work, which breaks obviously the app while it works great in development.
Maybe i am wrong, but i think that the helper should "just work" also in production and have some kind of simmetry
Did you try wicked_pdf_stylesheet_link_tag "pdf.scss.erb"?
Hey @pastullo, in case you're using the asset pipeline, you should try including the files in your precompile list in config/initializers/assets.rb as described in the Asset pipeline usage section of the README. Then the include helpers should work once you precompile your assets in production
@pastullo I can to precompile your assets in your local machine.
rake assets:cleanrake assets:precompile@unixmonkey @dstrus hey guys,
i notice the change in 1.1.0, tested it in production and now
stylesheet_link_tag wicked_pdf_asset_base64('pdf')
just works!
So i guess you fixed it! 馃憤
Oh yeah, wicked_asset_base64 didn't tap into sprockets before that change, but does now. :)
btw @unixmonkey i made a PR to explain a bit better in the readme how to use the asset helpers together with the asset pipeline. I think the readme are not very clear about that.
(https://github.com/mileszs/wicked_pdf/pull/592)
Most helpful comment
Hey @pastullo, in case you're using the asset pipeline, you should try including the files in your precompile list in
config/initializers/assets.rbas described in the Asset pipeline usage section of the README. Then the include helpers should work once you precompile your assets in production