问题描述
- $ gem sources -a https://ruby.taobao.org/ 报错
-
$ gem sources -a https://ruby.taobao.org/ --debug
NOTE: Debugging mode prints all exceptions even when rescued
ExceptionNameError' at C:/Ruby22-x64/lib/ruby/2.2.0/fiddle/import.rb:153 - uninitialized constant Fiddle::Function::STDCALL
Win32::Registry::Error' at C:/Ruby22-x64/lib/ruby/2.2.0/win32/registry.rb:249 - The system cannot find the file specified.
Exception
ExceptionWin32::Registry::Error' at C:/Ruby22-x64/lib/ruby/2.2.0/win32/registry.rb:249 - The system cannot find the file specified.
Win32::Registry::Error' at C:/Ruby22-x64/lib/ruby/2.2.0/win32/registry.rb:249 - The system cannot find the file specified.
Exception
ExceptionWin32::Registry::Error' at C:/Ruby22-x64/lib/ruby/2.2.0/win32/registry.rb:249 - No more data is available.
Resolv::DNS::Config::NXDomain' at C:/Ruby22-x64/lib/ruby/2.2.0/resolv.rb:546 - _rubygems._tcp.ruby.taobao.org
Exception
ExceptionResolv::DNS::Config::NXDomain' at C:/Ruby22-x64/lib/ruby/2.2.0/resolv.rb:546 - _rubygems._tcp.ruby.taobao.org.beijing.objectiva.local
Resolv::DNS::Config::NXDomain' at C:/Ruby22-x64/lib/ruby/2.2.0/resolv.rb:546 - _rubygems._tcp.ruby.taobao.org.Objectiva.local
Exception
ExceptionResolv::ResolvError' at C:/Ruby22-x64/lib/ruby/2.2.0/resolv.rb:491 - DNS result has no information for _rubygems._tcp.ruby.taobao.org
Errno::EEXIST' at C:/Ruby22-x64/lib/ruby/2.2.0/fileutils.rb:252 - File exists @ dir_s_mkdir - C:/Users/winstonqiao/.gem/specs/ruby.taobao.org%443
Exception
ExceptionErrno::ENOENT' at C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:306 - No such file or directory @ rb_file_s_stat - C:/Users/winstonqiao/.gem/specs/ruby.taobao.org%443/specs.4.8
OpenSSL::SSL::SSLErrorWaitReadable' at C:/Ruby22-x64/lib/ruby/2.2.0/openssl/buffering.rb:182 - read would block
Exception
ExceptionOpenSSL::SSL::SSLError' at C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:923 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
OpenSSL::SSL::SSLError' at C:/Ruby22-x64/lib/ruby/2.2.0/net/http.rb:931 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Exception
ExceptionGem::RemoteFetcher::FetchError' at C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/request.rb:88 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/specs.4.8.gz)
Gem::RemoteFetcher::FetchError' at C:/Ruby22-x64/lib/ruby/2.2.0/rubygems/remote_fetcher.rb:285 - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/specs.4.8.gz)
Exception
Error fetching https://ruby.taobao.org/:
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems-china.oss-cn-hangzhou.aliyuncs.com/specs.4.8.gz)
解决方案
$ gem sources --add https://ruby.taobao.org/ --remove https://rubygems.org/
$ gem sources -l
时间: 2024-11-08 21:10:59