SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
This error is actually produced by changes on rubygems site certificate in lieu of recent OpenSSL vulnerabilities. To fix this error one need to upgrade their rubygems
RubyGems bundles its trust certificate within itself (as it is used from command line tool),