Eric Guo's blog.cloud-mes.com

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

Install PostgreSQL 13 and Correct Ruby Pg Gem Support

Permalink

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 https://www.postgresql.org/download/linux/redhat/
sudo yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
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 build.pg --with-pg-config=/usr/pgsql-13/bin/pg_config
bundle install

Comments