Resolving "Failed to open TCP connection to"

I met an error report when I used jekyll-gist on my local machine:

Errno::ECONNREFUSED: Failed to open TCP connection to (Connection refused - connect(2) for "" port 443)

According to the calling stack, I discovered that it’s due to the timeout during connecting to So I tried to ping it, then discovered that this hostname was parsed to, and there was some packet loss.

I checked the IP address on this website, then discovered that it was not valid:

IP Address :
Location   : United States (95% accuracy)
Host Name  : Unable to contact the host at IP Address

So the solution is appending the correct IP address into the local Hosts file (/etc/hosts on UNIX).