At some purpose in each Rails application's life, you'll have to perform some reasonably maintenance or code update that may need taking your application offline for a short span of time. There 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 time period is 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.
Quick-Start with Turnout
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 identical time (to forestall writes to your database).
The main edges are:
In your Gemfile add:
rake maintenance:start reason="We're updating our site, please check back in 5 minutes"