I have a strange behavior with my engine gem https://github.com/antpaw/bhf on the production environment. The bhf/application.js
and bhf/application.css
is compiled the way you would expect it and also linked the right way in the template. But none of the assets/bhf/image
files are compiled and can be found in shared/assets/bhf/
on production server, unless i change
config.serve_static_assets = false
to true
in production.rb?
How bad is it to use this setting? And is there a way for my engine to work out-of-the-box?
Per your gemspec https://github.com/antpaw/bhf/blob/master/bhf.gemspec
It has a dependency on rails v4
s.add_dependency(%q<rails>, [">= 4.0.0"])
I suspect its related to asset digest. Where the assets are getting compiled as expected with digest but are referred from respective CSS without digest.
Its a possible issue with sprockets-rails discussed here issue#49
non-stupid-digest-assets - not so good but preferred solution
It will copy non-digested assets to
/public