The gem update --system times out.

Asked 2 years ago, Updated 2 years ago, 121 views

Environment: CentOS 7.5(1804)
on VirtualBox on mac $
when running gem update --system ERROR: While executing gem...(Gem::RemoteFetcher::UnknownHostError)
time out (https://api.rubygems.org/specs4.8.gz)
The message appears.

The ruby version is 2.5.1 (I also tried 2.3.0)
By the way, you can ping api.rubygems.org.

Thank you for your cooperation.

ruby-on-rails rubygems

2022-09-30 21:32

1 Answers

I was able to successfully install it by disabling IPv6 as you told me.

[Method]
①Open sysctl.conf
$ sudo vi/etc/sysctl.conf

以下 Add the following
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6 = 1

sSave and close sysctl.conf

設定 Reflect settings
$ sudo-p

IPvVerify that IPv6 does not exist
$ ip a

ggem update --system

That's all I was able to update.


2022-09-30 21:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.