Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been trying to update Git for a while. I'm currently stuck on, and I've tried updating to 1.7.4.x, and 1.7.5.x but it never works.

Today I compiled and installed Ruby 1.9.2, but it still shows up as 1.8.7.

I'm running 10.6.7 on a MacBook Pro.

I have no idea why it won't update. Any ideas? :(

share|improve this question
How are you compiling them? – Blender May 14 '11 at 6:14
Which Git package did you install / update? – h0tw1r3 May 14 '11 at 6:16
I just download Git from the website. I built Ruby with autoconf and sudo make install. – tylermwashburn May 14 '11 at 8:32
up vote 4 down vote accepted

Often, software compiled from source will install to /usr/local/bin. This is probably where you are installing your locally-compiled Ruby.

A common “downloadable” Git for Mac OS X is the git-osx-installer pre-built version. It installs to /usr/local/git/bin (though I suppose you might have downloaded some other variant).

Neither of those directories are in the default PATH environment variable, so neither will be used when you type ruby or git into your shell.

However, the system-bundled Ruby (version 1.8.7) and the Git that comes with Xcode 4 (, as I have read) are installed in /usr/bin, which is in the default PATH.

You probably just need to adjust your PATH in your shell initialization files. Just put your locally installed directories first.

If you are using bash (the default), add the following to your .bashrc:


and make sure you have the following in your .bash_profile or .bash_login (use whichever exists or .bash_profile if neither exist):

source ~/.bashrc
share|improve this answer

Make things simple for yourself: Use RVM for Ruby, and Homebrew for git (and other stuff).

RVM installs multiple (if desired) different versions of Ruby for you, and lets you switch between them easily.

Homebrew is basically fink/macports done... well, better. Much better.

Good luck!

share|improve this answer

Your Answer


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.