Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"bundle install" causes Gem::RemoteFetcher::FetchError on each gem

When calling

rails new project

The process progresses until I hit bundle install. At that point:

identical  vendor/plugins/.gitkeep
         run  bundle install
Fetching gem metadata from https://rubygems.org/.........

Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=unknown state: sslv3 alert handshake failure (https://d2chzxaqi4y7f8.cloudfront.net/gems/rake-0.9.2.2.gem)
An error occured while installing rake (0.9.2.2), and Bundler cannot continue.
Make sure that `gem install rake -v '0.9.2.2'` succeeds before bundling.

I can install the gem manually with gem install and launch rails new again, and the error repeats for the next gem. I end up installing manually every single gem.

I use rvm 1.13.0 single user.

like image 283
arden Avatar asked Apr 26 '12 08:04

arden


People also ask

How do I resolve gem dependencies?

Common Attempts To Resolve Ruby Gem Dependencies Bundler can help to resolve dependencies when working with Ruby gems by allowing you to specify a set of gems in a Gemfile, then issue a single command to install them. Bundler then automatically resolves the dependencies for you.

What does bundle gem do?

Bundler provides a consistent environment for Ruby projects by tracking and installing the exact gems and versions that are needed. Bundler is an exit from dependency hell, and ensures that the gems you need are present in development, staging, and production.


2 Answers

Do you have OpenSSL installed? You don't mention your OS, but on Ubunutu (or other Debian-based distros) you do:

sudo apt-get install openssl

Failing that, try http://railsapps.github.com/openssl-certificate-verify-failed.html

like image 97
Gazler Avatar answered Sep 23 '22 21:09

Gazler


Try this.

rvm pkg install openssl
rvm reinstall 1.9.2 --with-openssl-dir=$rvm_path/usr
like image 34
user181677 Avatar answered Sep 20 '22 21:09

user181677