Gem install proxy issue in template (proxy?)

Hello community,
In my template domain, i’m running:
sudo gem install -p "http://127.0.0.1:8082" sass-embedded
The system then replies:

fetch https://github.com/sass/dart-sass/releases/download/1.69.5/dart-sass-1.69.5-linux-x64.tar.gz
rake aborted!
Errno::ENETUNREACH: Failed to open TCP connection to github.com:443 (Network is unreachable - connect(2) for 140.82.121.4:443)

Previously I had added github.com in the /etc/hosts because I noticed I had a different error:
SocketError: Failed to open TCP connection to github.com:443 (getaddrinfo: Name or service not known)
So my guess was that the gem dns request was not taken into account.

To be clear, I tested my setup and one curl -x http://127.0.0.1:8082 https://github.com works perfectly

Did you face this problem? I’m stuck for so long…

Try it like this:
sudo https_proxy=http://127.0.0.1:8082/ http_proxy=http://127.0.0.1:8082/ gem install -p "http://127.0.0.1:8082" sass-embedded

2 Likes

Your solution is not exactly right, BUT the idea is there! :heartbeat:
The good adaptation is:

sudo su
export https_proxy=http://127.0.0.1:8082/
export http_proxy=http://127.0.0.1:8082/
gem install sass-embedded
1 Like