简体   繁体   中英

Can't install Bundler

Please don't mark this as a duplicate without telling me which question you think will help!

Something has happened to my system that messed with the OpenSSL such that it can no longer connect to any of the gems.

The current problem is that gem install bundler gives me the following error:

ERROR: Could not find a valid gem 'bundler' (>= 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 ( https://api.rubygems.org/specs.4.8.gz )

Here's the result of openssl version -a :

OpenSSL 1.0.2h  3 May 2016
built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
options:  bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: cc -I. -I.. -I../include  -fPIC -fno-common -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/openssl-1.0.2h/ssl"

Here's the result of which openssl :

/usr/local/bin/openssl

Also, checking the rvm ssl stuff:

$ rvm osx-ssl-certs status all
Certificates for /etc/openssl/cert.pem: Up to date.
Certificates for /usr/local/etc/openssl/cert.pem: Up to date.
[~/couponler2 (production)]
$ rvm osx-ssl-certs update all
Updating certificates for /etc/openssl/cert.pem: Already up to date.
Updating certificates for /usr/local/etc/openssl/cert.pem: Already up to date.

I've checked things all over stackoverflow, github, everywhere I can think of, and none of the solutions have worked. Please help!

So, I'm not sure if this is a good answer or not, but it's the only thing that actually ended up working.

First, I upgraded my Mac OSX to Sierra. It was back on Yosemite. I had to do this because my next step was to download the newest version of XCode (I was stuck back on version 7 because of Yosemite).

Then, I uninstalled each of these manually:

openssl: brew uninstall openssl

RVM: rvm remove

Homebrew: https://github.com/Homebrew/install

Finally, I reinstalled them one-by-one, reinstalled all my rubies, and that finally worked. Huge hassle, lots of time lost, and too much frustration for something I don't really care about. The bummers of being a developer these days. :(

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM