LoginSignup
0
1

More than 1 year has passed since last update.

WSL2 + Ubuntu20.04における bundle install時のSSL認証エラー解消法

Posted at

WSL2上でUbuntu20.04を用いてRubyのプロジェクトを進めていたところ、bundle installを実行した際に以下のSSL認証エラーが発生しました。

username@hostname:~/environment/development/sample-app$ bundle install
Fetching gem metadata from https://rubygems.org/..
Could not verify the SSL certificate for https://rubygems.org/quick/Marshal.4.8/rails-0.8.0.gemspec.rz.
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
https://railsapps.github.io/openssl-certificate-verify-failed.html.

この問題を解決するために以下の4つのコマンドを実行しました。

パッケージリストの更新

まず最初にシステムのパッケージリストを最新のものに更新します。

sudo apt-get update

システムのアップグレード

次にシステム内の全てのパッケージを最新のものにアップグレードします。

sudo apt-get upgrade -y

CA証明書のインストール

次にCA証明書をシステムにインストールします。これによりWebサイトからの安全なデータの送受信を保証します。

sudo apt-get install ca-certificates

CA証明書の更新

最後にシステム内のCA証明書を最新のものに更新します。

sudo update-ca-certificates
0
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
0
1