Imagine that I have a engine gem A that has your application.css and application.js
Those files are loaded via stylesheet_link_tag and javascript_include_tag. This works and everybody is happy.
Then comes gem B. That gem also has it’s own css/js that it wants gem A to use. So it injects it into the header of gem A like so stylesheet_link_tag('gem_b'). Works fine in development but blows up when trying to deploy with AssetNotPrecompiled exception.
So what kind of solution do I have?
I can use config.assets.precompile on the main app. That’s what I do now, but this really sucks.
Is there a way to inject into gem A application.css manifest somehow? That would be optimal.
Thanks.
Basically the idea is to always to only link application.js/css manifests. So you can’t safely use
stylesheet_link_tag('engine_a')but you can totally dostylesheet_link_tag('engine_a/application').