We have stopped our service over the unsafe HTTP protocol since 1st Oct 2015, please switch to HTTPS in your configuration.

RubyGems Mirror - Taobao

Why have this mirror?

Due to network issues in China (you understand),there are intermittent connection failures when accessing to rubygems.org and the files hosted on Amazon S3。That's why using gem install rack or bundle install might take forever with no response. (Try gem install rails -V to see the entire process.

This is a complete mirror of rubygems.org, so you can use it to replace the official version. In order to make sure it is in sync with the official server, it is currently synchronized once every 15 minutes.
How do I use it?
$ gem sources --remove https://rubygems.org/
$ gem sources -a https://ruby.taobao.org/
$ gem sources -l

# Ensure it only has ruby.taobao.org
$ gem install rails
If you use a Gemfile
You can use bundle'sgem source mirror command.
$ bundle config mirror.https://rubygems.org https://ruby.taobao.org
Then you don't need to change the source in your Gemfile.
source 'https://rubygems.org/'        
source 'https://ruby.taobao.org/'
gem 'rails', '4.1.0'
Ruby Source Code Mirror

This is a mirror of cache.ruby-lang.org that can be used to speed up Ruby installations for people in China.

Modify RVM to use this site as the download source to improve download speeds.

For Mac
$ sed -i .bak -E 's!https?://cache.ruby-lang.org/pub/ruby!https://ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db
For Linux
$ sed -i -E 's!https?://cache.ruby-lang.org/pub/ruby!https://ruby.taobao.org/mirrors/ruby!' $rvm_path/config/db
Common questions
  1. Q: Why can't my newly published gem be published using Taobao's mirror?

    A: Since synchronization is only executed periodically, new gems might not be synchronized yet. You will need to wait a while before trying again.

  2. Q: I've alread switched my sources to Taobao, but bundle install or gem install xxx are stuck for a long time. Why?

    A: This is possibly an issue with your network, or the source for the gem is not correct. You can try gem install xxx -V and create a post on Ruby China with the details asking for support.

  3. Q: When using gem install xxx why do I encounter this error: "Error fetching data: Errno::ETIMEDOUT: Operation timed out - connect(2)"?

    A: Network issues caused requests to Taobao's server to reset the connection. When encountering this issue, please try to access the mirror from another computer to see if the issue is with Taobao's mirror, or with your environment. If after switching environments, you still encounter the issue, please create a post on Ruby China.