Rails in production precompile

June 9, 2015 1.3k views


Recently I have spin up server Ubuntu, Rails ... server is running well. However, in case you update rails folder under /home/rails stuff will not work any longer due to the fact services such nginx & unicorn need to be stopped, besides in rails directory ruby precompile command need to run each time update has been done. This is a bit problem for those who need updating theirs rails app, therefore I have written small script doing all at once so in case you would like to take a look at I can send you so you could eventually publish it?


1 Answer

I know this is an old post, but that script sounds interesting! For anyone stumbling across this, you might want to look into using a tool like Capistrano for deploying changes to your Rails application. Among other things, it allows you write post-deployment hooks to run the various tasks needed. For more info, check out:

If you're using the DigitalOcean One-Click app, make sure to see the accompanying tutorial for the configuration details.

by O.S. Tezer
In this DigitalOcean article, we are going create a rock-solid server setup, running the latest version of CentOS to host Ruby-on-Rails applications using Nginx and Passenger. We will continue with learning how to automate the process of deployments - and updates - using the Ruby based automation tool Capistrano.
Have another answer? Share your knowledge.