安装Sass报错Error SSl verification error at depth 0: Hostname mimatch (62)
淘宝 RubyGems 镜像安装 Sass的步骤如下:
第一步:移动默认的源
gem sources --remove https://rubygems.org/
第二步:指定淘宝的源
gem sources -a https://ruby.taobao.org/
第三步:查看指定的源是不是淘宝源
gem sources -l
返回结果如下:
*** CURRENT SOURCES ***
https://ruby.taobao.org
请确保只有 ruby.taobao.org。如果无误之后,执行下面的命令:
gem install sass
按照之前的步骤一步一步操作,发现在第二步的时候报错,gem sources -a https://ruby.taobao.org/ Error SSl verification
error at depth 0: Hostname mimatch (62) (错误的SSl验证
深度为0时发生错误:主机名不匹配(62))
此时我们只需要把第二步的gem sources -a https://ruby.taobao.org/ 改为gem sources -add https://gems.ruby-china.com/ 或gem sources -a https://gems.ruby-china.com/ 也是可以的
以上是个人踩坑所遇到的,有不足之处请各位大佬指出,谢谢!