Trackman for Rails 2.3 - SynApps/trackman GitHub Wiki

Conventions

We assume your maintenance page is located at:

public/503.html

And the page to display if your app breaks during initialization:

public/503-error.html

Getting started

Step 1 - Install the addon, add the gem and run bundle install

heroku addons:add trackman
gem 'trackman'
bundle install
Step 2 - Generate Trackman tasks
./script/generate trackman_tasks

This will add trackman.rake to lib/tasks/

Step 3 - Setup

rake trackman:setup

This sets your initial heroku configurations and ensures that when your app is down or in maintenance your pages will be requested by heroku. If you already have maintenance or error pages configs for heroku, Trackman will copy with .bkp extensions before he overwrites them.

Step 4 (optional) - Scaffold your static pages

./script/generate trackman_controller [name]  

** You might also need to add the following to the errors_controller

require 'trackman'

This will generate a special controller that, when on development, will create your maintenance and error pages for you when you execute its actions. It generates the 4 different static pages.

The controller has class methods to filter the response output.
You can find examples on how to use them within the controller itself.

Step 5 - Deploy

Now that you have your maintenance pages, you can commit and push to Heroku.
Trackman will look for changes to your pages and linked assets and sync them on application boot.