Is it possible? I'm running into various issues at least once a week since it got corrupted or something, especially with homebrew.
If it is possible, but would just be a better idea to start from a clean slate, please let me know.
In my understanding -- please correct me if I am wrong -- you don't have to reinstall all of Mac OS X to reinstall your system Ruby. As you may know, the system ruby lives in /System/Library/Frameworks/Ruby.framework/. If that folder is deleted or corrupted -- or if the symlinks that point to it are deleted or changed -- you won't have a working system ruby install.
To fix, try this:
It also doesn't hurt to get the latest Xcode from http://developer.apple.com/technologies/xcode.html
Full disclosure: I have done these steps. I'm pretty sure it restores the Ruby.framework, but it has not restored the symlinks (typically in /usr/bin) for me.
If you use Pacifist then it's possible to just reinstall Ruby.
This will reinstall Ruby, to setup the symlinks from /usr/bin to point to it use Pacifist again:
In general if you need to figure out what installer a file came from on your system in a terminal:
The pkgid should then give you a hint, and then you either find that installer and run it again or use Pacifist to selectively do it.
You can also see what other files are in that package with:
I've found the best way to deal with Ruby on OS X is to get your system to the default state with the above process. Remove any MacPort, Fink or versions you have manually compiled. Install RVM and use that to manage installing newer versions.
Turns out that I had removed my system Ruby and had problems installing pow (http://pow.cx) on my mac because of it. So I installed Pacifist and followed the advice in this post and am back in business. Thanks!
Old post, but I was just switching from ports to homebrew so...
For homebrew issues, I resolved it by installing rvm and symlinking. So if you have rvm installed you can can start by typing:
with the output of that do something like:
I made a real mess of my Ruby installation on OSX but I used this GUI from the RVM team and managed to resolve it with little effort and no hacking around on a CLI