How To Install ruby-devel on CentOS 8

ruby-devel is A Ruby development environment A Ruby development environment

Introduction

In this tutorial we learn how to install ruby-devel on CentOS 8.

What is ruby-devel

Header files and libraries for building an extension library for the Ruby or an application embedding Ruby. ruby-devel 2.5.9 107.module_el8.4.0+847+ee687b6c x86_64 126 k ruby-2.5.9-107.module_el8.4.0+847+ee687b6c.src.rpm appstream A Ruby development environment http (Ruby or BSD) and Public Domain and MIT and CC0 and zlib and UCD Header files and libraries for building an extension library for the Ruby or an application embedding Ruby.

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

Install ruby-devel on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install ruby-devel

Install ruby-devel on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo yum -y install ruby-devel

How To Uninstall ruby-devel on CentOS 8

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

sudo dnf remove ruby-devel

ruby-devel Package Contents on CentOS 8

/usr/include/ruby
/usr/include/ruby.h
/usr/include/ruby/backward
/usr/include/ruby/backward.h
/usr/include/ruby/backward/classext.h
/usr/include/ruby/backward/rubyio.h
/usr/include/ruby/backward/rubysig.h
/usr/include/ruby/backward/st.h
/usr/include/ruby/backward/util.h
/usr/include/ruby/config-i386.h
/usr/include/ruby/config.h
/usr/include/ruby/debug.h
/usr/include/ruby/defines.h
/usr/include/ruby/digest.h
/usr/include/ruby/encoding.h
/usr/include/ruby/intern.h
/usr/include/ruby/io.h
/usr/include/ruby/missing.h
/usr/include/ruby/onigmo.h
/usr/include/ruby/oniguruma.h
/usr/include/ruby/re.h
/usr/include/ruby/regex.h
/usr/include/ruby/ruby.h
/usr/include/ruby/st.h
/usr/include/ruby/subst.h
/usr/include/ruby/thread.h
/usr/include/ruby/thread_native.h
/usr/include/ruby/util.h
/usr/include/ruby/version.h
/usr/include/ruby/vm.h
/usr/lib/libruby.so
/usr/lib/pkgconfig/ruby.pc
/usr/lib/rpm/macros.d/macros.ruby
/usr/share/licenses/ruby-devel
/usr/share/licenses/ruby-devel/BSDL
/usr/share/licenses/ruby-devel/COPYING
/usr/share/licenses/ruby-devel/COPYING.ja
/usr/share/licenses/ruby-devel/GPL
/usr/share/licenses/ruby-devel/LEGAL
/usr/include/ruby
/usr/include/ruby.h
/usr/include/ruby/backward
/usr/include/ruby/backward.h
/usr/include/ruby/backward/classext.h
/usr/include/ruby/backward/rubyio.h
/usr/include/ruby/backward/rubysig.h
/usr/include/ruby/backward/st.h
/usr/include/ruby/backward/util.h
/usr/include/ruby/config-x86_64.h
/usr/include/ruby/config.h
/usr/include/ruby/debug.h
/usr/include/ruby/defines.h
/usr/include/ruby/digest.h
/usr/include/ruby/encoding.h
/usr/include/ruby/intern.h
/usr/include/ruby/io.h
/usr/include/ruby/missing.h
/usr/include/ruby/onigmo.h
/usr/include/ruby/oniguruma.h
/usr/include/ruby/re.h
/usr/include/ruby/regex.h
/usr/include/ruby/ruby.h
/usr/include/ruby/st.h
/usr/include/ruby/subst.h
/usr/include/ruby/thread.h
/usr/include/ruby/thread_native.h
/usr/include/ruby/util.h
/usr/include/ruby/version.h
/usr/include/ruby/vm.h
/usr/lib/rpm/macros.d/macros.ruby
/usr/lib64/libruby.so
/usr/lib64/pkgconfig/ruby.pc
/usr/share/licenses/ruby-devel
/usr/share/licenses/ruby-devel/BSDL
/usr/share/licenses/ruby-devel/COPYING
/usr/share/licenses/ruby-devel/COPYING.ja
/usr/share/licenses/ruby-devel/GPL
/usr/share/licenses/ruby-devel/LEGAL

References

Summary

In this tutorial we learn how to install ruby-devel on CentOS 8 using yum and dnf.