Reputation: 1302
The other day I just randomly delete the whole ruby framework now I want to reinstall it. It is strange that I can not find /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby file even if I reinstall it. However, the lib under /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr appear each time I reinstall.
I use the command line dmg to reinstall, also I used the reinstalling xcode approach. But it is no use.
The homebrew is using the framework ruby. So that's why I want to reinstall the framework.
Can any people help me.
Upvotes: 0
Views: 288
Reputation: 24
You can change the interpreter in the first line of brew, Set it to the ruby in the RVM and it will work.
Upvotes: 0
Reputation: 160571
Mac OS comes with Ruby installed for its own purposes, so it's important to leave that alone.
From a quick search, there's only one application that uses the built-in Ruby:
/usr/lib/podcastproducer
There might be other things, but that's all that popped up in a quick search using locate
.
So, if you don't need to generate podcasts, you might be safe to not worry about reinstalling the system Ruby.
I'll recommend using either rbenv or RVM to manage your Ruby installation in a separate sandbox. That way, if you blow it away, deliberately or accidentally, you won't affect anything else.
If you go with either, read through their installation instructions a couple times before you install. StackOverflow is littered with questions from people who didn't bother to understand what they were doing before starting.
Upvotes: 0
Reputation: 2637
Is there any reason to use Ruby 1.8? OSX comes with Ruby pre-installed but I like to use RVM to have more control over Ruby versions. If you want to, you could take a look at: https://rvm.io/rvm/install/
Also you need to remember that in order to install some gems you'll need a compiler and other development tools. In Mac OSX install disk you can optionally install the development tools that include XCode and command line tools. It's available on Apple's App Store.
Upvotes: 2