All you need to do is:
update your Gemfile to the correct version of Rails
run **bundle update rails** in the root of your directory
then **git commit -am "update rails"** to save the files
then **git push heroku** to update on Heroic
The Heroku email has the information for all the Rails versions - if you are running 3.1.4, then you need to update to 3.1.10, if 3.2.X then 3.2.11 is your new version - this should be a safe update. Just pick the latest number for the X.Y version that you currently have in your Gemfile.