Ask Different is a question and answer site for power users of Apple hardware and software. 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 having this problem for the past several years where I like to stay up-to-date and install the latest versions of software like Ruby, Rails, and Git. However, I somehow always seem to have difficulty using the latest versions.

For example, I go to the terminal and type

git --version

Which tells me that I'm running git

So I go to the git website and pick up the handy installer file (git-1.7.6-x86_64-snow-leopard.dmg). Then I mount the disk image and run the .pkg file... successfully installed.

However, when I go back and type git --version again, it still says I'm running git and not the newly installed 1.7.6.

Generally whenever I've had these problems it has turned out that I had successfully completed the installations of the new software, I just don't necessarily know where it's installed. What is the best way to keep clean installations of these and not have a bunch of different versions lying around in different places on the file system?

share|improve this question
up vote 1 down vote accepted

The general issue is your PATH. Go to the terminal and type echo $PATH On a plain OSX install you will see /usr/bin ahead of /usr/local/bin so the executables in the former are found furst which will be the older Apple supplied ones. You need to set the PATH in your ~/.bashrc file e.g. export PATH=/usr/local/bin:$PATH which will set /usr/local/bin as the first directory to look in.

As to which directories you need to set on the path it depends. Most lain installs and builds default to /usr/local/bin but Git I think goes to /usr/local/git/bin. So you need to look at what the package installes. As @CyberSkull says using a package manage can make this easier/ For macports add /opt/local/bin and for Fink /sw/bin to the fromt of the path - but only use one of them.

share|improve this answer

This would be the case where you may want to use a packange manager like MacPorts or Fink. They generally install in a seperate directory like /opt/local/bin so as not to collide with the already installed software. (Note that these download the source codes and dependancies and compile them instead of fetching a compiled binary, so it can take some time for larger packages.)

Another think to do is open up the .pkg file in Installer and Get Info (⌘I) to list all the files, and often where they go. You can also show the log (⌘L) to see where things have been written and what has been done.

share|improve this answer

My newly installed git is in the /usr/local, and I export this path in my .profile to use the new git.

For Ruby, I installed the v1.9.2, following the instruction from:, and using the RVM (

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.