1

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 1.7.3.4

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 1.7.3.4 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?

1

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.

1

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.

0

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: http://www.stevestmartin.com/2009/09/11/ruby-1-9-2-on-snow-leopard/, and using the RVM (http://beginrescueend.com/rvm/install/)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .