To update ruby version used by a ruby on rails app we need to start with installing the ruby version we want. This can be accomplished very easy with Ruby Version Manager (RVM).
RVM Terminal
Start a terminal window and run this to install RVM and Ruby 1.9.3:
$ \curl -L https://get.rvm.io | bash -s stable --ruby=1.9.3 --autolibs=enabled
When the install is done quit the terminal and start it again, then run this command to set ruby version:
rvm --default use 1.9.3
Next update the gemfile with the new ruby version:
ruby '1.9.3'
And we’re done!