0

The problem is, every time I want to use bundle install, some error messages shows like that:

Gem::RemoteFetcher::FetchError: 
SSL_connect returned=1 errno=0 state=unknown state: unknown protocol 
(https://s3.amazonaws.com/production.s3.rubygems.org/gems/jquery-rails-3.1.0.gem)
An error occurred while installing jquery-rails (3.1.0), and Bundler cannot continue.
Make sure that `gem install jquery-rails -v '3.1.0'` succeeds before bundling.

If I use bundle update, the gems that stuck last time may or may not be installed successfully, but some other gems stuck.

And every things work when I change the line source 'https://rubygems.org' to source 'http://rubygems.org'

This problem happens recently, it used to be fine.

my openssl version: OpenSSL 1.0.1c 10 May 2012. It is newest version I can get.

update:

What I already did:

rvm autolibs packages
rvm reinstall 2.0.0

,install ca-certificates, already newest version

,reinstall openssl, still not working

more informations:

All the debug informations

debug information update:

I don't get the same error every time I type "gem i rails -V" details

unicellular
  • 61
  • 3
  • 8
  • did you try `gem update --system`? – S. A. Feb 04 '14 at 02:34
  • Iupdate rubygems many times, sometimes it works, sometimes it doesn't. This the result I try `gem update --system` last time: `ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) SSL_connect returned=1 errno=0 state=unknown state: unknown protocol (https://s3.amazonaws.com/production.s3.rubygems.org/specs.4.8.gz)` – unicellular Feb 04 '14 at 02:42
  • It seems openssl's problem, but I have no idea to deal with. – unicellular Feb 05 '14 at 03:51
  • Maybe [this problem](http://stackoverflow.com/questions/17369962/opensslsslsslerror-ssl-connect-returned-1-errno-0-state-unknown-state-unkn) is similar to my problem, but I cannot understand how it solved. – unicellular Feb 08 '14 at 07:26
  • Try updating RVM. Usually RVM can resolve OpenSSL issues. – Daniel Kehoe Feb 11 '14 at 03:27
  • I did again after reading your comment, but still not working. – unicellular Feb 11 '14 at 08:08

2 Answers2

0

This is RubyGem's bug, and it would happen randomly when you try to use rubygem to install a gem. (The issue is here https://github.com/rubygems/rubygems/issues/515#issuecomment-25613357)

You can just update OpenSSL certificate file, and it would be fine!

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...

Staying Healthy

$ sudo rvm osx-ssl-certs cron install

And here is the page which would help you too!

http://railsapps.github.io/openssl-certificate-verify-failed.html

Alex Chen
  • 41
  • 2
0

It turns out a problem of my ISP, a useless service call 色情守門員, which means porn goalkeeper. I ask my ISP to turn off that, then everything are working fine.

unicellular
  • 61
  • 3
  • 8