Rails 4 requires Ruby 1.9.3 or newer. My app failed to work on Heroku's Cedar stack until I added this line to my Gemfile :

ruby '1.9.3' # If you're running a newer version of Ruby, specify it here