ruby on rails - Use assets from gem in production mode -
i trying figure out how boostrap-sass working in production mode. using apache reverse proxy either webrick or puma, serve static assets in public/assets directly. when precompile assets, bootstrap css gets included application-(hash).css , works correctly.
however compiled css references image file (glyphicons-halfling.png) without appending hash of file contents. image file included in public/assets directory, , possible browse putting correct filename in address bar, filename in css not match it. have created simple demo app demonstrates problem, code on github page
the glyphicon filename glyphicons-halflings-c806376f05e4ccabe2c5315a8e95667c.png
[edit]
would still answer question, i've renamed offending files remove hash. since these files unlikely change should work fine
think have cracked, when run rake assets:precompile, seems must prefix rails_env=production in order work in production mode (i guess kind of makes sense). if don't, of assets precompiled, helper methods not generate correct paths.
tl:dr, rails_env=production rake assets:precompile
Comments
Post a Comment