问题
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 is preventing me from doing development work on localhost:3000 before deploying.
Does anyone know how to resolve this issue?
回答1:
Upgrade to the latest version of Ruby or at least a newer version than the one you have. I was using 2.0.0-p247 and received the same error. When I upgraded to 2.2.5 (which is the oldest supported version at the time of this writing) then everything worked.
I also had to run gem install bundler
after upgrading ruby. Last, I'm using rbenv and installed ruby with rbenv install 2.2.5
then ran rbenv local 2.2.5
.
回答2:
In the Gemfile in your rails application directory change:
source 'https://rubygems.org'
to
source 'http://rubygems.org'
来源:https://stackoverflow.com/questions/29201748/how-to-resolve-bundle-install-rake-error-and-gemremotefetcherfetcherror