Getting ruby 1.8.7 and newer to compile with readline support on Red Hat Enterprise Linux (RHEL4 and RHEL5) · 4 April 2009, 06:20

Paraphrased from

First, ensure you have the following packages installed:

Then make sure you remove the system ruby and ruby-devel packages, otherwise gems and other extensions might find the wrong version of ruby when they look for compile flags etc:

After unpacking the source for ruby, do the usual:

configure --prefix /usr/local
make all
sudo make install

Now do the following from the ruby source directory:

cd ext/readline
/usr/local/bin/ruby extconf.rb
make install

To ensure that ruby now has readline support, run

/usr/local/bin/ruby -rreadline -e 1

If you get no output (which should be the result), voila, readline support is now active.

— Max Schubert



Textile Help