Rails does not update fingerprints for some assets

I notice that a strange thing happens in rails 4.2.0. I use the default dev environment. When I change some of my JS files, the fingerprint does not change, and it continues to serve the old file. The strange thing is that this does not happen with all my JS / CSS files. I tried to restart my machine and restart the rails server. None of them worked. Renaming the file works, but when I rename it back to the old one, it will start serving the old version again. Does anyone have an idea why?

+5
source share
2 answers

Be sure to set config.serve_static_files = false in config / environment / development.rb and reset the browser cache.

+1
source

I'm not sure if we have the same situation, but hopefully this helps.

Link

I used the custom all_scss application instead of the usual application.scss stylesheet, in which application-all.scss was used as part of Rails.application.config.assets.precompile .

I renamed application-all.scss to digested-name application.scss and updated the corresponding code.

After that, he now worked for me.

-1
source

Source: https://habr.com/ru/post/1212683/


All Articles