How can I fix these OpenSSL and Rails certificate verify failed errors?

At some point I started getting this error while trying to update gems:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

  • How to include directories while debugging and testing a gem
  • Rails vanity gem custom metric error: private method `to_time' called
  • Which version of friendly Id gem to use with Rails 3.2.17
  • Issue installing capybara-webkit gem, recursive error?
  • Use bundler installed gem in another bundler directory
  • Error while installing ruby-serialport gem
  • How can you debug and fix this?

  • doing something wrong with auto_html gem?
  • What is the 'etc' ruby gem for?
  • How to specify local instead of installed Gem
  • getting access token using omniauth-salesforce gem
  • “bundle install” causes Gem::RemoteFetcher::FetchError on each gem
  • flapjack plugin installation with logstash
  • One Solution collect form web for “How can I fix these OpenSSL and Rails certificate verify failed errors?”

    Details how to fix:

    openssl::ssl::sslerror: ssl_connect returned=1 errno=0 state=sslv3 read server certificate b: certificate verify failed


    could not load openssl. you must recompile ruby with openssl support or change the sources in your gemfile from 'https' to 'http'. instructions for compiling with openssl using rvm are available at

    Ruby is the best programming language in the world - Ruby on Rails.