Error installing Bundler

Had the same issue and everything is described here: http://railsapps.github.io/openssl-certificate-verify-failed.html

tl;dr Recent versions of RVM, the Ruby Version Manager, include a utility to diagnose and resolve errors caused by outdated certificate files. See the article Installing Rails for instructions and advice. The RVM website explains how to install RVM.

If you’ve installed RVM, try this:

$ rvm -v
# rvm 1.19.1 (stable)
$ rvm osx-ssl-certs status all
# Certificates for...
$ rvm osx-ssl-certs update all
# Updating certificates...

That’s all that is needed to resolve the issue if you are using RVM (you must be using RVM version 1.19.1 or newer).


After looking at some of the answers to the Stack question @Matt referenced, although the error was different, one of the solutions also helped me for this problem.

In the home directory, create a file called .gemrc. Add :ssl_verify_mode: 0 to the file. Bundler then installs without issue.

This works for my situation as I'm behind a corporate firewall. However, this obviously opens up a security hole.


Windows users:

You can't run rvm command on Windows as you can see here, but you can fix the error without it. Just add a new source adress with http instead of https:

gem sources -a http://rubygems.org

Then you can run:

gem install bundler