Cannot run 'sudo gem install rails', OSX 10.6 hangs on command line

Subject says it all, I'm running OSX Snow Leopard 10.6, RubyGems is
fully updated, Ruby is 1.8.7 stable, but I can't seem to get the Rails
gem to install.

I've reinstalled ruby, rails, rubygems and gem.

get the lastest XCode version on apple web site and install it!

G