Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (19 sloc) 1.298 kb

Working on Heroku

The use of config/app.rb makes working on Heroku a little more difficult due to the platform's readonly file system (everything that is to be deployed should be inside the Git repository directly).

I get around this using a production branch where app.rb is committed. This branch is pushed to Heroku but obviously never to GitHub.

git checkout -b production
cp config/app.rb.example config/app.rb
<edit app.rb>
git commit config/app.rb

When making a change to the Rails app, checkout master, commit the changes, then rebase the production branch to master.

git checkout master
<edits>
git commit
git checkout production
git rebase master

Deploy production to Heroku as described on Stack Overflow:

git push heroku production:master

Multiple Environments

It's often useful to have both a staging and production Heroku app, and if you do, it's very convenient to link a local branch to each of these remote applications. This process is described in Heroku's docs.

Jump to Line
Something went wrong with that request. Please try again.