Apparently, in some cases, there is a problem with the IPv6 direction of rubygems.org. Just disable the IPv6 for your network and retry.