1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

RubyでHTTPS接続時にSSL証明書のエラーがでる。

Last updated at Posted at 2013-11-05

bundle installgem install 実行時に下記のエラーが出力された。

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B

これはSSL証明書が見つからなくて、HTTPS接続に失敗しているのが原因だ。
対応するには Ruby がSSL証明書を見つけられるようにすればよい。

% brew install curl-ca-bundle

# SSL証明書をどこに置けばいいのかを調べる。
% ruby -ropenssl -e 'p OpenSSL::X509::DEFAULT_CERT_FILE'
"/usr/local/etc/openssl/cert.pem"
%  cp /usr/local/opt/curl-ca-bundle/share/ca-bundle.crt /usr/local/etc/openssl/cert.pem
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?