3
3

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.

rbenv環境でのCould not verify the SSL certificateというエラーの対処方法

Posted at

railsのプロジェクトでbundle installをしようとしたら、下記のエラーに出会いました。

[hatone@MAC]~/hogehoge% bundle install
Fetching source index from https://rubygems.org/
Could not verify the SSL certificate for https://rubygems.org/.
There is a chance you are experiencing a man-in-the-middle attack, but most likely your system doesn't have the CA certificates needed for verification. For information about OpenSSL certificates, see bit.ly/ruby-ssl. To connect without using SSL, edit your Gemfile
sources and change 'https' to 'http'.

rvmでの対処方法はこちら bundle install する時、証明書エラーが出る。にありました。
↓で対処が出来ました。

[hatone@MAC]~/hogehoge% ruby -ropenssl -e 'p OpenSSL::X509::DEFAULT_CERT_FILE'
[hatone@MAC]~/hogehoge% cp /usr/local/Cellar/curl-ca-bundle/1.87/share/ca-bundle.crt /usr/local/etc/openssl/cert.pem
3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?