Install and Compile Ruby 1.9.3+ from Source with libyaml on CentOS

If you are looking to install Ruby 1.9.3+ on a Linux system this will guide you through compiling the software. There is always the option to use yum to install ruby packages but the versions in repositories will be older, not the latest stable. This guide is using a Centos 5.x base system without any packages installed and all commands run as root.

1. First the system will need the appropriate packages to compile and install the source code for ruby. To do this run the following command.