When using Heroku, Postgres is a Must
Why does my application work in the local development environment, but not in production?

Heroku is an awesome service. It provides a stable platform and tools for quickly deploying applications to the cloud, and allows users to enjoy all the scaling benefits cloud infrastructure can provide. One gotcha I have experienced, however, is Heroku’s reliance on the Postgres database, instead of MySQL.
While researching Heroku I noticed this, but naively assumed that I could use MySQL for local development, and that any differences between these two databases would be relatively obvious, and that I could compensate on the backend. ”Surely” I remember thinking, “almost all of my database queries will be performed in Active Record, and so I’ll be protected from DB differences anyway.” Unfortunately, I was wrong.
Some portions of my application code required implementing a slightly tricky join with the aggregate function ‘avg’. The results of this ended up going into a vector.
Unfortunately, Active Record returns strings instead of floats or integers for aggregate functions in Postgres. This is obviously leads to problems if your app is expecting something it can calculate with, and in my case leading to a silent conversion to 0.0. The end result was an application that performed differently on production at Heroku than locally in my MySQL development environment, and several hours spent moving to Postgres locally.
Lesson learned. Postgres all the way.
Update: It turns out converting to Postgres and removing DatabaseCleaner calls from my spec_helper reduced spec time from 78.2 seconds to 38.75 seconds. 50% faster specs eases the pain.