Ruby on Rails Installation Problem

I have been trying to install Ruby on Rails using the command “gem
install rails --remote” I am getting an error because it needs the
proxy server. I provided the proxy server but now it is asking for
authentication. Does the “gem” command has a flag so it can send the
username and password to the proxy server?

PJ