1

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?

Flavio Wuensche
  • 9,460
  • 1
  • 57
  • 54

2 Answers2

1

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.

Jack
  • 131,802
  • 30
  • 241
  • 343
  • how are you sure there is no need to re-install the system ruby? what about xcode or osx apps that rely on ruby, won't they try run ruby from the default location? – speedynomads Jul 04 '13 at 07:51
0

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.

Noah Clark
  • 8,101
  • 14
  • 74
  • 116