Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Whilst installing Ruby on OsX I noticed I could do so by using a package manager called Homebrew. This seemed like an easy option, so I took it. Everything worked smoothly. Life was good.

Being a curious fellow, I looked into what other benefits having homebrew installed would give me, and in my study found that Homebrew is written in ruby.

Woah, wait a minute! How is it then, that I can install Ruby using something that is written in Ruby, not already having Ruby on my system, and once installed said ruby based system I STILL have to install ruby separetely?

Warning: Do not read this question aloud. You risk getting a Kaiser Chiefs single stuck in your head for the remainder of the day.

share|improve this question
    
How are you sure you don't have ruby on your system? –  Eimantas Aug 30 '11 at 9:57
    
Clearly, I am not. :) –  Mild Fuzz Aug 30 '11 at 9:59

1 Answer 1

up vote 2 down vote accepted

OS X comes pre bundled with system ruby. If you typed which -a ruby I'm pretty sure you'd get at least 3 results: system, homebrew and linked-to-homebrew.

It is also possible that homebrew installation is written in sh which in turn downloads and compiles ruby for itself.

update

Just do ln -h /usr/bin/ruby. It should tell you that it's symlink from system folder.

share|improve this answer
    
I get two, /usr/bin/ruby & /usr/local/bin/ruby –  Mild Fuzz Aug 30 '11 at 9:58
    
/usr/bin/ruby is the system one (which is linked from /System/Library/Frameworks/Ruby.framework/...) –  Eimantas Aug 30 '11 at 9:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.