$ gem update --system # 这里请翻墙一下
$ gem -v
2.6.3
$ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
$ gem sources -l
https://gems.ruby-china.org
// 确保只有 gems.ruby-china.org
你可以用 Bundler 的 Gem 源代码镜像命令
$ bundle config mirror.https://rubygems.org https://gems.ruby-china.org
这样你不用改你的 Gemfile 的 source
source 'https://rubygems.org/'
gem 'rails', '4.2.5'