If you have apt-get if you use Debian, Mac OS X has Homebrew that isn’t built in with the system, but it’s easy to get.
I wanted to set up Ruby environments on my computer, this is why I need Rubygems, and using Homebrew will make things easier.
So here is how I installed Homebrew on Mavericks