Error in gem update

When I tried to perform the following command this is what I got, I have also perfromed ```
su - mastodon

gem update --system

ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
time out (https://rubygems.org/specs.4.8.gz

I have disabled Ip6 still happens

any help please