Below step could solve the issue
While gem is stalling, I ran **netstat**
netstat -tnp | grep ruby
and I got below output
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 1 2401:4900:188e:90:56960 2a04:4e42:600::644:443 SYN_SENT 4096/ruby
and 2a04:4e42:600::644:443 is one of the addresses of api.rubygems.org
My conclusion is that gem uses IPv6 when it can.
**So disabling IPV6 on my workstation fixed it.**
Below are the steps to temporarily disabled IPV6 on Ubuntu. IPV6 will be enabled by When we restart system system after restart.
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
Note: Use sudo for `permission denied` issue.
While gem is stalling, I ran **netstat**
netstat -tnp | grep ruby
and I got below output
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
tcp6 0 1 2401:4900:188e:90:56960 2a04:4e42:600::644:443 SYN_SENT 4096/ruby
and 2a04:4e42:600::644:443 is one of the addresses of api.rubygems.org
My conclusion is that gem uses IPv6 when it can.
**So disabling IPV6 on my workstation fixed it.**
Below are the steps to temporarily disabled IPV6 on Ubuntu. IPV6 will be enabled after system restart.
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
Note: Use sudo for `permission denied` issue.