[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

-++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-

Recommended Posts

What to do if a communication error occurs due to proxy when installing with package management of pip, npm, gem
What to do if an error occurs when importing numpy with VScode
What to do if a UnicodeDecodeError occurs in pip
What to do if you get an error when installing python with pyenv
What to do if an error occurs when loading a python project created with poetry into VS Code
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do when a Remove Error occurs when updating conda
What to do if a 0xC0000005 error occurs in tf.train.start_queue_runners ()
What to do when an error occurs with import _ssl
What to do if you get an Undefined error when trying to use pip with pyenv
[Beanstalk] What to do when an error occurs with import uuid
What to do if you get a UnicodeDecodeError with pip install
What to do if pip --user returns an error in a virtual environment created with pyenv
What to do if you get an error when installing Dlib (Ubuntu)
[OSX] [pyenv] What to do when an SSL error occurs in pip
Error when installing a module with Python pip
[Django] What to do if an Integrity Error occurs when registering data from the management site to the database
What to do when PermissionError of tempfile.mkstemp occurs
[Python] What to do if an error occurs in pip (pyinstaller, pyautogui, etc.)
[python] What to do when an error occurs in send_keys of headless chrome
What to do when SSL error occurs in pip in Windows10, miniconda, VScode environment
What to do if scrapy doesn't work after installing scrapy with pip on mac
What to do if a Unicode Encode Error occurs in Sublime Text Python
What to do if a version error occurs in the selenium Chrome driver
A memorandum when an error occurs with pip install
What to do if you get a memory error when converting from PySparkDataFrame to PandasDataFrame
What to do if you get an Import Error when importing matplotlib with Jupyter
[AWS] What to do when you want to pip with Lambda
What to do if pip gives a DistributionError in Homebrew
What to do if package installation fails when deploying to heroku
What to do if you can't install pyaudio with pip #Python
What to do when a part of the background image becomes transparent when the transparent image is combined with Pillow
What to do if you get a must override `get_config` error when trying to model.save in Keras
What to do if you get a "Wrong Python Platform" warning when using Python with the NetBeans IDE
What to do if you get a Permission denied (public key) error when trying to pull on Github
What to do if a symbolic link error occurs in import cv while trying to install OpenCV in Python
[Memorandum] What to do when a warning appears after executing pip list
What to do if pyenv install does not proceed with an error
What to do if you get a TypeError with numpy min, max
What to do if you get an error when trying to load mnist
What to do if you can't install with pip in babun environment
What to do if you get Could not fetch URL 443 with pip
What to do if fprintd requires a password when registering your fingerprint
What to do when a warning message is displayed in pip list
A workaround when installing pyAudio with pip.
What to do if you are told "Import Error: cannot import name'HTTPSHandler'" when building a virtual environment using virtualenv
What to do if you get a "No versions found" error in pipenv
Workaround if you get an error when trying to install PySide with pip
What to do if CERTIFICATE_VERIFY_FAILED occurs when nltk.download () is done on macOS pyhon
What to do if an SSL connection error (ssl.SSLError: [SSL: DH_KEY_TOO_SMALL]) occurs on Ubuntu 20.04
Note: What to do if pip install fails
What to do if pip cannot be installed
What to do if you get the error "Error: opencv3: Does not support building both Python 2 and 3 wrappers" when installing openCV 3
What to do if pvcreate produces a lot of WARNING and cannot be created
What to do if you get "(35,'SSL connect error')" in pycurl (one of them)
What to do if you get an error when importing matplotlib in Python (Mac)
[Introduction to Python] What is the recommended way to install pip, a package management system?
What to do if you get the error ʻERR_FEATURE_UNAVAILABLE_ON_PLATFORM` when using ts-node-dev on Linux
What to do if you run python in IntelliJ and end with an error
What to do if you can't pip install mysqlclient
What to do when gdal_merge creates a huge file