When you receive this kind of error on heroku, the best way to debbug it is to open the rails console: heroku run console.
But if your rails console run fine, it can be painful to figure out where is the problem. In my case, a constant was initialized more than once by mistake. It only throws this warning warning: already initialized constant MY_CONSTANT
but crash my dyno on Heroku.