How to install plugins behind a proxy

Hello there.

I'm trying to install some plugins for my Rails application but my network is behind a proxy server. The gem installer have the -p parameter to configure a proxy and it works ok, but what about script/ plugin install?


You can set http_proxy to make it sense.

hi EricSun, can you please tell me in a more detailedly, I installed Instant Rails on a Windows machine. now i want to install a plugin but failing since i am not able to set the proxy server settings.

Awaited for your help. thanks in advance


in linux systems you have to set a envionment variable like this, export http_proxy="http://myproxyserver:8080" # http can be what ever protocol your proxy server supports and myproxyserver can be a name or IP.

in windows i am not sure but i guess you try this,

right-click on MyComputer, then go to properties, click Advanced tab , click on the button Environment Variables in the 3rd Row, add a new variable called http_proxy if does not exist, then set the value as stated above.

If this is not working, you have to find out the variable equivalent to http_proxy of linux to windows, then set it.

i guess thats what Eric was talking about.

and one more thing is none of the above works out, you can use this one ruby scripts/plugin install --http-proxy="http://myproxyserver:8080/" plugin-url for every plugin you install you have to give --http-proxy option, but if you use a environment variable you don't have to give this. If given this takes priority over environment variable.

Good Luck,