My goodness, I have very little experience with Ruby and I'm currently in the process of trying to get a rails 3 app from github running on my osx system (1.8.7 default ruby version). I have spent the past several hours fighting with ruby versions and dependencies with the only glimmer of hope being successfully getting a hello world rails 4 app running.
Seriously I thought ruby was supposed to be a beacon of simplicity? Someone please tell me there's a light at the end of this tunnel.
Edit: Some folks have mentioned getting the RVM. I think I was unclear when I just said I've been fighting with ruby versions - I meant that all of this was done with RVM/gems/bundle/etc, but it's still been a p.i.t.a.
If you want to play with Ruby and not Rails specifically, may I suggest a less monstrous framework, like Sinatra [1] or Ramaze [2]. Both come in one gem and have only one dependency - Rack (web server gateway).
You do not need a version manager to give Ruby a try. Although, it's a nice thing to have. If you decide to use one, you basically have 3 options: 1. rvm (most popular and bloated), 2. rbenv (simple), 3. chruby (even simpler).
If you can, I advise you to switch to Ruby 2.0. It's faster, got a lot of new features and it's becoming the default in the community.
Last piece of advice, do not mix up Ruby and Rails :)
If you are just trying to hack something together - don't worry. 1.8.7 has worked for a long time, and it will continue to do so for a while.
But if you are actually trying to build something to use long term - as crappy as it is to hear it now, it is not a great idea to use the system version of ruby. since it is likely as you get into ruby that you will have multiple projects which amy or may not require different subversions of ruby, you should always use rvm. it allows you to install multiple versions of ruby side by side.
You might want to be careful: in OS X Mavericks, the default version of Ruby is 2.0.0p195. If you decide to upgrade, you'll have to go through this pain all over again.
If you're using Homebrew, you can install rbenv, ruby-build, and then use rbenv install to install a new Ruby version. Homebrew has its own version of Ruby, but it's the latest version and it's more maintainable to use rbenv or RVM to manage Ruby installations. It's sort of a pain, but once everything's set up, you won't have to think about it again.
You should install a ruby version manager. Most apps will specify the version in the project (.rvmrc or .ruby-version). If you have a ruby version manager and the required version installed, your system will switch automatically. Installing different versions of ruby is just a one liner.
I've got a theory that this is one of the reasons that system configuration/deployment aids are so popular right now. My experience has been that there's trouble with this every time I spin up a new Ruby project (particularly Rails) and/or move to a new system. It does tend to get better as you get into individual projects, though.
I found similar problems trying to get Rails running on OSX Lion. In the end I just went to using virtual machines running Ubuntu for development. I didn't bother with RVM, I just installed Ruby with apt-get and it was all really straight forward.
Seriously I thought ruby was supposed to be a beacon of simplicity? Someone please tell me there's a light at the end of this tunnel.
Edit: Some folks have mentioned getting the RVM. I think I was unclear when I just said I've been fighting with ruby versions - I meant that all of this was done with RVM/gems/bundle/etc, but it's still been a p.i.t.a.