Flavio Wuensche
Flavio Wuensche

Reputation: 10376

Recover pre-installed ruby to Mac OS X

I know it should never be done, but I accidentally removed the folder /usr/bin/ruby from my Mac OS X. With that I lost all pre-installed ruby files. Now when trying to install Homebrew, for instance, I get the error:

-bash: /usr/bin/ruby: No such file or directory

How can I get pre-installed ruby back to /usr/bin?

Upvotes: 1

Views: 873

Answers (2)

Noah Clark
Noah Clark

Reputation: 8131

Could you just download it from: ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6-p111.tar.bz2

and then compile it into your /usr/bin directory.

There still might be permission/ownership issues you'd have to deal with.

Upvotes: 0

Jack
Jack

Reputation: 133609

Just install rvm and get most updated ruby. Even because the one shipped with OS X is rather obsolete (it should be 1.8.7 if I remember correctly).

There's no need to reinstall the bundled one when you can install an updated version in just a couple of minutes.

Upvotes: 1

Related Questions