In my views I put :
<%= image_tag("coin.png") %>
My original image is put on :
app/assets/images/coin.png
But in production mode the html code generated by image_tag is :
<img alt="Coin" src="/assets/coin.png">
Instead of hitting precompiled assets :
coin-aba0e66819d64251cb3bb4bb29b26eb2.png
(and naturally I cant see the image).
I didn't forgot to precompile my assets.
and my environment/production.rb is :
config.cache_classes = true
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.serve_static_assets = false
config.assets.compress = true
config.assets.js_compressor = :uglifier
config.action_dispatch.x_sendfile_header = "X-Accel-Redirect"
Thanks you a lot
I found it !!!!!!!
Add to your production.rb :
config.assets.digest = true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With