The solution is to use the RubyGems image of Taobao, which is a complete rubygems.org mirror, you can replace the official version, Sync frequency is currently 15 minutes to ensure that as far as possible with the official service synchronization.
How to use
Gem
Remove the old source and use the new feed instead.
Copy Code code as follows:
$ gem Sources--remove https://rubygems.org/
$ gem sources-a http://ruby.taobao.org/
$ gem sources-l
Current SOURCES * * *
http://ruby.taobao.org
# Please make sure only ruby.taobao.org
$ gem Install you want to install the gem
Bundle
Copy Code code as follows:
SOURCE ' http://ruby.taobao.org/'
Gem ' rails ', ' 4.0.2 '
...
Ruby Source Code Mirroring
As an additional benefit, Taobao also offers ruby source code download mirrors to improve the speed of ruby installation in the country.
For example, using RVM, you can switch to Taobao for download sources:
Copy Code code as follows:
$ Sed-i ' s!cache.ruby-lang.org/pub/ruby!ruby.taobao.org/mirrors/ruby! ' $RVM _path/config/db