Why rails precompile a task without digesting assets

When I do this: rake assets: precompile RAILS_ENV = production I get, for example, the following files in my public / assets folder:

  • application-7af6c31514bcdd4cce3c96892af4487f.js
  • applications 7af6c31514bcdd4cce3c96892af4487f.js.gz
  • application.js
  • application.js.gz

The last 2 are a problem because it leads to the fact that the compiled version gets access to the development, and I do not understand why they are generated.

I have the following line in my production.rb:

config.assets.digest = true 
+4
source share
2 answers

To stop the creation of unidentified file names in public use:

 rake assets:precompile:primary RAILS_ENV=production 
+6
source

This is the normal behavior of the asset compiler, files without digests are generated mainly for use on error pages, etc. (where you don’t have access to the MD5 hash file) and there is currently no way to enable them. Furthermore, this question is almost identical to this: Rails compiles assets with and without a hash, why?

+2
source

All Articles