The default Rails app installed by rails new
has config.assets.compile = false
in production.
And the ordinary way to do things is to run
For anyone using Heroku:
If you deploy to Herkou, it will do the precompile for you automatically during the deploy if compiled assets are not included (i.e. public/assets
not committed) so no need for config.assets.compile = true
, or to commit the precompiled assets.
Heroku's docs are here. A CDN is recommended to remove the load on the dyno resource.