Installing gem through proxy

I am trying to install gem through proxy(on Windows XP),but have been
unsuccessful.Can anyone,please tell me the exact way to go about it?
thks