Okay after some more research I have worked out the problem. Sigh.
On my local machine I am loading my database configuration as follows:
dbconfig = YAML::load(File.open(File.join("config","database.yml")))
but because the yml
file that Heroku generates is actually an ERB
file in disguise, I need to parse it first.
Changing the above line to:
dbconfig = YAML.load(ERB.new(File.read(File.join("config","database.yml"))).result)
works a treat.