For well-known reasons, domestic access to foreign sites will be slow or not accessible at all. So the demand of the gem source replace domestic source: https://ruby.taobao.org/
Let’s take a look at the gem sources currently in use:
gem source -l
\*\*\* CURRENT SOURCES \*\*\*
https://rubygems.org/
The source for RubyGems.org is currently in use. To remove the current gem source:
gem sources –remove https://rubygems.org/
https://rubygems.org/ removed from sources
Add a gem source to Taobao:
gem sources -a https://ruby.taobao.org/
https://ruby.taobao.org/ added to sources
Let’s look at the source we are currently using:
gem source -l
\*\*\* CURRENT SOURCES \*\*\*
https://ruby.taobao.org/
Taobao gem source replacement success!