Eric Guo's

Hoping writing JS, Ruby & Rails and Go article, but fallback to DevOps note

Install PostgreSQL 13 and Correct Ruby Pg Gem Support


Install postgresql13

Installation is similar to postgresql12.

# postgresql v12.3+ require LLVM-toolset-7-clang
sudo yum install centos-release-scl-rh
sudo yum install llvm-toolset-7-clang
# following
sudo yum install -y
sudo yum install -y postgresql13-server
sudo /usr/pgsql-13/bin/postgresql-13-setup initdb
sudo systemctl enable postgresql-13
sudo systemctl start postgresql-13
# Checking DB status
sudo systemctl status postgresql-13.service

Install pg gem correctly

bundle config --with-pg-config=/usr/pgsql-13/bin/pg_config
bundle install