Wednesday, 21 March 2018

macos - Is it possible to reinstall/fix Mac OS X's system ruby without doing a complete OS reinstall?


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.



Answer



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:



  1. Insert your Mac OS X Install DVD

  2. Open the Mac OS X Install DVD folder

  3. Open the Optional Installs folder

  4. Open the Xcode Tools folder

  5. Open the XcodeTools package. This will start the Xcode Tools Installer. Follow the instructions.


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.


No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...