I'm also running 1.23.10 and I'm having the exact same issue pulling gems for rubies 1.9.3 and 2.0.0. Sometimes it works, sometimes it gets halfway through the Gemfile and throws that SSL error and sometimes it throws it right after "Fetching source index from https://rubygems.org/".
We've been dealing with this on Semaphore too, with the
Ubuntu 12.04 with latest base packages
any Ruby it seems
Upgrading RubyGems is one step but if you read what people
who've really solved it on
Mac OS with RVM did, the second step is to somehow update the
root certificates on the system.
The problem on Linux (somehow only now exposed) seems to be that
Ruby's OpenSSL wrapper is looking at the wrong place for root
certificates. On Ubuntu these are provided by the
ca-certificates package. See eg this discussion on
current solution is latest RubyGems + setting the
SSL_CERT_FILE environment variable. Still need to wait
a bit for lack of error reports from users though, because it is
not possible to reproduce the error reliably.
OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server hello A: wrong version number
I'm experiencing this on my Bamboo build server. It's irritating to be getting constant build failures when running tests or deploying to heroku, where the problem also seems to manifest, but much rarer.
Bamboo takes 3 or 4 tries to successfully bundle, heroku fails maybe 1 out of 6 deploys.
I don't know off the top of my head what custom version of linux Bamboo runs on, but this occurs with whatever my previous version was, and my newly updated rubygems, no rbenv or rvm.
Heroku has their own stack, too.
Interestingly this hasn't happened once on my Mac with rbenv, locally, old version of rubygems, on Lion nor Mavericks, rubies MRI 1.9, 2.0, 2.1, or rbx 2.0.
I'm also receiving the same error after running bundle
update on Windows (RubyGems v2.1.10).
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.global.ssl.fastly.net/gems/aws-sdk-1.24.0.gem)
An error occurred while installing aws-sdk (1.24.0), and Bundler cannot continue.
Make sure that `gem install aws-sdk -v '1.24.0'` succeeds before bundling.
Bundler::Fetcher::CertificateFailureError: Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile sources and change 'https' to 'http'.
An error occurred while installing activemerchant (1.37.0), and Bundler cannot continue.
Make sure that `gem install activemerchant -v '1.37.0'` succeeds before bundling.
Environment: ruby-p247, openssl 1.0.1e, bundler 1.3.5, OS X