How can I set a proxy server for gem? How can I set a proxy server for gem? windows windows

How can I set a proxy server for gem?


For http/https proxy with or without authentication:

Run one of the following commands in cmd.exe

set http_proxy=http://your_proxy:your_portset http_proxy=http://username:password@your_proxy:your_portset https_proxy=https://your_proxy:your_portset https_proxy=https://username:password@your_proxy:your_port


You need to write this in the command prompt:

set HTTP_PROXY=http://your_proxy:your_port


You need to add http_proxy and https_proxy environment variables as described here.