リア充爆発日記

You don't even know what ria-ju really is.

gem updateができない-certificate verify failed

gemのバージョンが2.0.2だったので最新の2.0.3に上げようとgem updateをやったが反応がない、ただのしかばねのようだ。

$ gem update --system
Latest version currently installed. Aborting.

gemのupdateは実際にはrubygems-updateが使われているらしいので、そちらをいじってみたところ、エラーが出た。

$ gem install rubygems-update
ERROR:  Could not find a valid gem 'rubygems-update' (>= 0), here is why:
          Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/latest_specs.4.8.gz)

なんか、証明書がどーたらとかで、gemを2.0.3にすれば大丈夫的な情報もあったけど、2.0.3にできないから困ってんだって。
で、SSLが問題ならhttpでやればいいじゃない、ということでその方向で対応する。

$ gem source --add http://rubygems.org
https://rubygems.org is recommended for security over http://rubygems.org

Do you want to add this insecure source? [yn]  y

セキュリティー的にhttpはオススメできない、という警告がでるがスルー。

で、2.0.3にしたあとに、再度 SSLオンリーにしておいて対応完了、ということで。

$ gem source --remove http://rubygems.org