Install the heroku gem.
$ [sudo] gem install heroku
Create a git repository and commit the typo source code to the repository.
$ cd <wherever you extracted typo>
$ git init
$ git add *
$ git commit -m 'The typo package.'
Typo tries to create a couple of empty folders on startup. We need to pre-empt this as heroku doesn’t allow writing.
$ touch public/files/.gitkeep
$ touch tmp/cache/.gitkeep
You need to tell heroku that you need all of the correct gems installed. To do this I copy and pasted from typo’s environment.rb file.
$ cat .gems
rails --source gemcutter.org --version '2.3.5'
htmlentities --source gemcutter.org
calendar_date_select --source gemcutter.org
bluecloth --source gemcutter.org --version '~> 2.0.5'
coderay --source gemcutter.org --version '~> 0.8'
RedCloth --source gemcutter.org --version '~> 4.2.2'
addressable --source gemcutter.org --version '~> 2.1.0'
mini_magick --source gemcutter.org --version '~> 1.2.5'
mislav-will_paginate --source gems.github.com --version '~> 2.3.11'
panztel-actionwebservice --source gems.github.com --version '= 2.3.5'
Typo appears to do filesystem access in two main areas. For things to work properly on heroku we need to stop that.
Firstly, it tries to setup the public folder copying assets from the plugins. Since the guys from typo appear to already have all of these files up to date it seems ok to just disable this. I did this by using the NoWrite module in FileUtils.
$ cat config/preinitializer.rb
require 'fileutils'
file_utils_no_write = FileUtils::NoWrite
Object.send :remove_const, :FileUtils
FileUtils = file_utils_no_write
Secondly, it appears to do a lot of file manipulation when managing themes. I can deal with leaving that alone. I will do theme manipulation manually using git when I need to.
Commit everything to the git repository.
$ git add *
$ git commit -m 'Getting things setup for heroku'
Get heroku setup. I am not going to get into this here. There is great documentation for this on heroku.com.
Push the code to heroku.
$ git push heroku master
Get the database ready to go.
$ heroku rake db:migrate
Hit your heroku url and get typo setup as you normally would.