How To Install ruby on Rocky Linux 8

In this tutorial we learn how to install ruby on Rocky Linux 8. ruby is An interpreter of object-oriented scripting language

Introduction

In this tutorial we learn how to install ruby on Rocky Linux 8.

What is ruby

Ruby is the interpreted scripting language for quick and easy object-oriented programming. It has many features to process text files and to do system management tasks (as in Perl). It is simple, straight-forward, and extensible.

We can use yum or dnf to install ruby on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install ruby.

Install ruby on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install ruby

Install ruby on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install ruby using yum by running the following command:

sudo yum -y install ruby

How To Uninstall ruby on Rocky Linux 8

To uninstall only the ruby package we can use the following command:

sudo dnf remove ruby

ruby Package Contents on Rocky Linux 8

/usr/bin/erb
/usr/bin/ruby
/usr/lib/.build-id
/usr/lib/.build-id/b3
/usr/lib/.build-id/b3/7a60877f2bc76c3497cc1ab95cd7e8ffcbe9df
/usr/share/licenses/ruby
/usr/share/licenses/ruby/BSDL
/usr/share/licenses/ruby/COPYING
/usr/share/licenses/ruby/COPYING.ja
/usr/share/licenses/ruby/GPL
/usr/share/licenses/ruby/LEGAL
/usr/share/man/man1/erb.1.gz
/usr/share/man/man1/ruby.1.gz
/usr/bin/erb
/usr/bin/ruby
/usr/lib/.build-id
/usr/lib/.build-id/c1
/usr/lib/.build-id/c1/50cadafb7be70007107a08e4c96e2c9772e801
/usr/share/licenses/ruby
/usr/share/licenses/ruby/BSDL
/usr/share/licenses/ruby/COPYING
/usr/share/licenses/ruby/COPYING.ja
/usr/share/licenses/ruby/GPL
/usr/share/licenses/ruby/LEGAL
/usr/share/man/man1/erb.1.gz
/usr/share/man/man1/ruby.1.gz
/usr/bin/erb
/usr/bin/ruby
/usr/lib/.build-id
/usr/lib/.build-id/ca
/usr/lib/.build-id/ca/10f7c011e502eaf8ed8a8437501bb0259c41f8
/usr/share/licenses/ruby
/usr/share/licenses/ruby/BSDL
/usr/share/licenses/ruby/COPYING
/usr/share/licenses/ruby/COPYING.ja
/usr/share/licenses/ruby/GPL
/usr/share/licenses/ruby/LEGAL
/usr/share/man/man1/erb.1.gz
/usr/share/man/man1/ruby.1.gz
/usr/bin/erb
/usr/bin/ruby
/usr/lib/.build-id
/usr/lib/.build-id/cf
/usr/lib/.build-id/cf/a2f0601d61bfd6350277359c07f727667bf539
/usr/share/licenses/ruby
/usr/share/licenses/ruby/BSDL
/usr/share/licenses/ruby/COPYING
/usr/share/licenses/ruby/COPYING.ja
/usr/share/licenses/ruby/GPL
/usr/share/licenses/ruby/LEGAL
/usr/share/man/man1/erb.1.gz
/usr/share/man/man1/ruby.1.gz

References

Summary

In this tutorial we learn how to install ruby on Rocky Linux 8 using yum and dnf.