Custom maintenance pages

Posted by Jamis on January 05, 2007 @ 04:32 PM

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!

Posted in Redirect

Comments

Have something to add? Click here to leave a comment.

06 Jan 2007

1. James Adam said...

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).

2. Jacob Atzen said...

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.

10 Jan 2007

3. John Topley said...

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…?

4. Jamis said...

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.

5. John Topley said...

Thanks Jamis, that’s what I thought.