See the article Rails Deploy to Heroku.