Rails开发:Gem更换淘宝源

部署服务器时因为GFW的原因使用gem install XXX命令报错如下:

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::ECONNRESET: Connection reset by peer - SSL_connect (https://api.rubygems.org/quick/Marshal.4.8/rails-3.1.1.gemspec.rz)

执行如下命令更换gem源

gem sources --remove https://rubygems.org/

gem sources -a http://ruby.taobao.org/

你可能感兴趣的:(Rails)