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
git into your shell.
However, the system-bundled Ruby (version 1.8.7) and the Git that comes with Xcode 4 (184.108.40.206, 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
and make sure you have the following in your
.bash_login (use whichever exists or
.bash_profile if neither exist):