$ gem sources --remove https://rubygems.org/
$ gem sources -a http://ruby.taobao.org/
$ gem sources -l
CURRENT SOURCES
http://ruby.taobao.org
# 请确保只有 ruby.taobao.org
$(# for me) gem install rails
另外,执行 bundle install –deployment –without development test postgres aws 也会卡住
修改 gitlab/GemFile里,改为 source="http://ruby.taobao.org"即可