How To Install rubygem-rainbow on Fedora 36

In this tutorial we learn how to install rubygem-rainbow in Fedora 36. rubygem-rainbow is Ruby String class extension enabling coloring text on ANSI terminals

Introduction

In this tutorial we learn how to install rubygem-rainbow on Fedora 36.

What is rubygem-rainbow

Rainbow is an extension to the Ruby String class adding support for colorizing text on ANSI terminals.

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

Install rubygem-rainbow on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

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

sudo dnf -y install rubygem-rainbow

Install rubygem-rainbow on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

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

sudo yum -y install rubygem-rainbow

How To Uninstall rubygem-rainbow on Fedora 36

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

sudo dnf remove rubygem-rainbow

rubygem-rainbow Package Contents on Fedora 36

/usr/share/gems/gems/rainbow-3.0.0
/usr/share/gems/gems/rainbow-3.0.0/LICENSE
/usr/share/gems/gems/rainbow-3.0.0/lib
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/color.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/ext
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/ext/string.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/global.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/null_presenter.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/presenter.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/refinement.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/string_utils.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/version.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/wrapper.rb
/usr/share/gems/gems/rainbow-3.0.0/lib/rainbow/x11_color_names.rb
/usr/share/gems/specifications/rainbow-3.0.0.gemspec

References

Summary

In this tutorial we learn how to install rubygem-rainbow on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).