At some purpose in each Rails application's life, you'll have to perform some reasonable maintenance or code update that may need to take your application offline for a short span of time. Their square measure strategies to attain zero-downtime deployments, however typically it's simply easier to require your application offline for five minutes throughout a preparation. If you recognize that no one is writing information into the info, then you do not need to worry regarding synchronizing information or merging info backups back in once your deployment is finished. It simply makes life less complicated in cases once a number of minutes of the time period are appropriate.
But, throughout this "dark period," once your application is offline, you must still offer your users some notice of what's happening, and after they will expect the upkeep amount to finish.
The turnout gem makes it straightforward to quickly place up a friendly maintenance page for your users, and block access to all or any routes at an identical time (to forestall writes to your database).
In your Gemfile add:
rake maintenance:start reason="We're updating our site, please check back in 5 minutes"