If you’re deploying your Rails application to a production environment, it’s ideal to precompile your assets. To do this, you’ll want to run,
RAILS_ENV=production rails assets:precompile
RAILS_ENV=production tells Rails to compile the production version of the assets.
assets:precompile is a Rails provided rake task that has instructions for compiling the assets.