Note that there are some explanatory texts on larger screens.

plurals
  1. PORails compiles assets both with and without md5 hash, why?
    text
    copied!<p>I'm relatively new to RoR and I'm curious about why Rails compiles assets both with and without md5 hash for production?</p> <p>I run <code>bundle exec rake assets:clean</code> then <code>bundle exec rake assets:precompile</code></p> <p>My production.rb file:</p> <pre><code>MyApp::Application.configure do # Code is not reloaded between requests config.cache_classes = true # Full error reports are disabled and caching is turned on config.consider_all_requests_local = false config.action_controller.perform_caching = true # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = false # Compress JavaScripts and CSS config.assets.compress = true # Don't fallback to assets pipeline if a precompiled asset is missed config.assets.compile = false # Generate digests for assets URLs config.assets.digest = true config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx config.assets.precompile += %w(tos.js, tos.css) config.i18n.fallbacks = true config.active_support.deprecation = :notify end </code></pre> <p>My application works with files with hashes in their names and it's the way it should be in my case :)</p> <p>So I have two questions here:</p> <p>1) Why is it happening when compiled?</p> <blockquote> <p>Rails compiles assets both with and without md5 hash for production</p> </blockquote> <p>2) What are these files (without hashes) for?</p> <p>Maybe I don't get something, so please could someone explain.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload