When I run bundle install
for my Rails 3 project on Centos 5.5 it fails with an error:
Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3
read server certificate B: certificate verify failed
(https://bb-m.rubygems.org/gems/multi_json-1.3.2.gem)
An error occured while installing multi_json (1.3.2), and Bundler cannot continue.
Make sure that `gem install multi_json -v '1.3.2'` succeeds before bundling.
When I try to install the gem manually (by gem install multi_json -v '1.3.2'
) it works. The same problem occurs with several other gems. I use RVM (1.12.3), ruby 1.9.2, bundler 1.1.3.
How to fix it?
I get a slightly different error, though perhaps related, on Ubuntu 12.04:
It happens when I run
bundle install
withsource 'https://rubygems.org'
in a Gemfile.This is an issue with OpenSSL on Ubuntu 12.04. See Rubygems issue #319.
To fix this, run
apt-get update && apt-get upgrade
on Ubuntu 12.04 to upgrade your OpenSSL.I had to reinstall openssl:
Simple copy paste instruction given here about .pem file
https://gist.github.com/luislavena/f064211759ee0f806c88
For certificate verification failed
For Windows machine, check your gem version with
Then update your gem as follow:
Please download the file in a directory that you can later point to (eg. the root of your hard drive C:)
Now, using your Command Prompt:
Now, bundle install will success without SSL certificate verification error.
More detailed instruction is here