How To Install rubygem-pg on AlmaLinux 8

In this tutorial we learn how to install rubygem-pg in AlmaLinux 8. rubygem-pg is A Ruby interface to the PostgreSQL RDBMS

Introduction

In this tutorial we learn how to install rubygem-pg on AlmaLinux 8.

What is rubygem-pg

This is the extension library to access a PostgreSQL database from Ruby. This library works with PostgreSQL 9.1 and later.

We can use yum or dnf to install rubygem-pg on AlmaLinux 8. In this tutorial we discuss both methods but you only need to choose one of method to install rubygem-pg.

Install rubygem-pg on AlmaLinux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install rubygem-pg using dnf by running the following command:

sudo dnf -y install rubygem-pg

Install rubygem-pg on AlmaLinux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install rubygem-pg using yum by running the following command:

sudo yum -y install rubygem-pg

How To Uninstall rubygem-pg on AlmaLinux 8

To uninstall only the rubygem-pg package we can use the following command:

sudo dnf remove rubygem-pg

References

Summary

In this tutorial we learn how to install rubygem-pg on AlmaLinux 8 using yum and dnf.