How to fix the error installing rake and Gem :: RemoteFetcher :: FetchError

When I run bundle install on ruby ​​2.1.2, I get:

 Gem::RemoteFetcher::FetchError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/gems/rake-10.4.2.gem) An error occurred while installing rake (10.4.2), and Bundler cannot continue. Make sure that `gem install rake -v '10.4.2'` succeeds before bundling. 

When I run gem install rake , I get:

 ERROR: Could not find a valid gem 'bundle' (>= 0), here is why: Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed 

When I run which bundle , I get:

 /usr/local/rvm/gems/ ruby-2.1.2@global /bin/bundle 

This error prevents me from doing development work on localhost: 3000 before deployment.

Does anyone know how to solve this problem?

+1
source share
2 answers

Upgrade to the latest version of Ruby, or at least a newer version than the one you have. I used 2.0.0-p247 and got the same error. When I upgraded to 2.2.5 (which is the oldest supported version at the time of this writing), it all worked.

I also had to run gem install bundler after updating ruby. Finally, I use rbenv and installed ruby ​​with rbenv install 2.2.5 , then rbenv local 2.2.5 .

+1
source

In the Gemfile in your application directory, rails will change:

 source 'https://rubygems.org' 

to

 source 'http://rubygems.org' 
+14
source

Source: https://habr.com/ru/post/952243/


All Articles