Picture of Michael Lee
:wave: Hey hey, I'm @michaelsoolee! I'm a full-stack developer, maker of one too many side projects and dad.

Precompiling Rails assets for production

Written on June 3, 2019

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.

Stay in touch

Thanks for reading this article. I'd love to stay in touch and share more tips on programming, design and side projects with you. Sign up and I'll send you my articles straight to your email.