How can you install new versions of Ruby, Rails, and Git without running into the old versions?
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.