Just delete /System/Library/Frameworks/Ruby.framework
, /Library/Ruby
, and erb
, gem
, irb
, rdoc
, ri
, ruby
, and testrb
from /usr/bin
.
Warning: OS X expects and sometimes relies on frameworks and software shipped with the system. It would be a very bad idea to remove the system Ruby. It might even get replaced next time you update OS X -- or it might not, but OS X might expect it to be there, and then bad things will happen. Remove it at your own risk. I am providing this answer because you asked, but I would not recommend removing a system framework.
Why do you want to remove it? It's not hurting anything to sit there, unused.
2Just out of curiosity - why remove it? It's not exactly intrusive. Are you extremely short on disk space or something? – Matt – 2010-09-29T14:34:22.660
1I'm in agreement with other posters. Unless you've extremely short on disk space, I'd leave it go. It's possible there may be some underlying dependency that could be broken if you remove Ruby. – 8BitsOfGeek – 2010-09-29T15:48:03.127
1If you mess with files in the /System/ directory, you deserve whatever evils befall you. Just don't do it. – ghoppe – 2010-09-30T17:59:04.837
1It's easy to see what will be affected by removing the system Ruby. From the command-line type:
find /usr -type f -name \*.rb
. That will be one thing that is affected. Applications could expect ruby in/usr/bin
also, and they will fail. In general, it's not a good idea to mess with executables in/usr/bin
,/sbin
or/usr/sbin
. – TTM – 2011-11-22T23:32:36.987@Greg You do realize that ruby files don't need a
.rb
extension? – Daniel Beck – 2011-12-05T18:53:52.033Of course, but for this purpose it was sufficient. Beats trying to find all files with that extension, or that contain matches for all the tokens available in Ruby. – TTM – 2011-12-05T19:38:21.107