If you’re seeing errors related to Tcl/Tk when building Ruby 1.8.7 (say, with RVM) on Mountain Lion, it’s because X11 is no longer shipped with OS X.
Now you have to install XQuartz instead; also install a non-clang gcc-4.2. Then:
CC=/usr/local/bin/gcc-4.2 CPPFLAGS=-I/opt/X11/include rvm install 1.8.7