Ruby noob here. I installed Ruby 1.9.3 but it still defaults to my pre-installed system version (1.8). For example:
$ gem install rails
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/1.8 directory.
I used rbenv to try to set the global version to 1.9.3
$ rbenv global 1.9.3-p448
But still, I have this issue and when I check the version, I get 1.8:
$ ruby -v
ruby 1.8.7 (2012-02-08 patchlevel 358) [universal-darwin12.0]