ActiveRecord::StatementInvalid: PG::Error: ERROR: cannot execute UPDATE in a read-only transaction error in Heroku
The replica never actually got promoted. See comments.
You can tell when a replica is following a master server because:
SELECT pg_is_in_recovery();
will return true. This cannot return true in a master server because the only time a master server can be in recovery is when it is still starting up - and then you cannot connect to it, so you can't run that command. That's true as of 9.2 and 9.3beta; this may change in future versions, so if you're reading this and on a newer version check for a dedicated function for checking if the server is a replica.