LoginSignup
0
0

More than 3 years have passed since last update.

Rails6でPG::ConnectionBadというエラーが出た原因と対応

Posted at

エラーが出た手順

rails sでWebサーバー起動

http://localhost:3000/ にアクセスすると
PG::ConnectionBadというエラーが出た

3C20CC71-D23D-4497-A685-5704DA0F704A.png

原因

db(PostgreSQL)のほうはdockerで立ち上げる構成だったのだけど
立ち上げ忘れていたので、dbに接続できない状態だった。

対応

docker-compose up -dでDBを起動する

確認

webページの再読み込み

正常に表示された OK!

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