Rails routes are built when the app starts (or if you're under a lot of
traffic, if you fork a new Apache process). Rails is a long-running process,
and it does not reload at each request. You would have to restart the server to
have a change in routes make a difference. If you've deployed with
So I tried this:
Rails.application.routes.draw do
if File.exist?('/home/real-estate-data-mining/MaintenanceNow')
get '*', redirect_to: '/maintenance.html'
else
resources :experiments
resources :articles
end
end
but it doesn't work
I do see that there is a Rails.application.rel
I have used this route in the past to do this in an informal manner:
get '*', redirect_to: '/maintenance.html'
...and put that at or near the top of the routes file. Comment it out when you
want to run normally.
The Gem approach will do a more thorough job, catching post and patch and
everythi
On Wed, Feb 21, 2018 at 5:10 PM, Ralph Shnelvar wrote:
> Since Server X and Server Y are - more or less - identically configured,
> what is the best way for me to put up an "Under maintenance" web page?
One possibility: https://github.com/capistrano/maintenance
At the least you might get some i
4 matches
Mail list logo