The instructions on the official Ruby on Rails website, were not working for me, so here is how it really works.
The most important part first: You have to setup a password for your account, otherwise it is not going to work.
Then open the Terminal (Go > Utilities > Terminal) and type
sudo gem update –system
Type your password and hit ENTER again.
sudo gem install rails
sudo gem update rake
sudo gem update sqlite3-ruby
now Ruby on Rails should run in the latest version!