I think that most of us that have upgraded to Mountain Lion have encountered this issue already, but for those that have not, here is what you need to do.
Chances are that if you are trying to install Ruby you are getting an error, which once you look in the log, says:
configure: error: no acceptable C compiler found in $PATH
Even if you had Xcode installed before you will need to download it from the App store and install it. After it is installed, open Xcode, go to preferences and then the downloads tab. There you will see an option to install the command line tools.
Restart your terminal, and you should be able to install Ruby.