[RUBY] What to do if a communication error occurs due to proxy when installing with package management of pip, npm, gem
Make a note of what to do if a communication error occurs when installing a package from the command line.
It seemed that the error was caused by the Proxy setting, so I investigated how to set it.
The proxy was as follows in Internet Explorer Internet Options-> Connections-> LAN Settings
-[x] Use automatic configuration script
http://proxy.-----.co.jp/proxy.pac
(----- is Hidden)
-+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
python pip
Add --proxy = to the command
Example
pip install --proxy=http://proxy.------.co.jp/proxy.pac --upgrade google-api-python-client
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Node.js npm
Set proxy and https-proxy with npm config set.
Example
npm config set proxy http://proxy.-----.co.jp/proxy.pac
npm config set https-proxy http://proxy.-----.co.jp/proxy.pac
npm install googleapis --save
The contents set in config can be confirmed below.
npm config list
Detail is
npm config ls -l
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
Ruby gem
Add -p to the command
Example:
gem install mechanize -r -p http://proxy.-----.co.jp/proxy.pac
-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-