Custom maintenance pages
5 January 2007 —
1-minute read
Mike Clark has got a great writeup on how to create custom maintenance pages for use with Capistrano and Apache. I haven’t seen much written where people are using the render
helper in Capistrano—it’s good to see it getting some use, anyway!
Reader Comments
We’re using the render helper to produce a customised dispatch.fcgi, so that the correct ruby binary is added at the top in the #! string, regardless of which server we’re deploying too and how it might differ from our development environments (we develop on Windows, Linux and Mac).
6 Jan 2007
I’ve recently built a recipe to create apache / mongrel / monit configurations with the use of the render helper. It’s very sweet to be able to create new installations without really having to touch the server. This was heavily inspired by work done by members of Copenhagen.rb which have done something along the same lines.
6 Jan 2007
Is there a way to link to your app’s stylesheet in the maintenance.rhtml page? I get a Capistrano error if I try to use <%= stylesheet_link_tag %> and using the straight HTML syntax fails too, presumably because the Apache rewrite rules redirect all requests to maintenance.html…?
10 Jan 2007
John, the template is not evaluated using any Rails helpers, so the stylesheet_link_tag helper isn’t available. If you want to use an external stylesheet, you’ll need to use straight HTML, and then tweak your apache rewrite rules to allow stylesheets to be accessed.
10 Jan 2007
Thanks Jamis, that’s what I thought.
10 Jan 2007