Getting ruby 1.8.7 and newer to compile with readline support on Red Hat Enterprise Linux (RHEL4 and RHEL5) · 4 April 2009, 10:20
Paraphrased from http://www.sanft.com/2008/12/01/upgrading-to-ruby-186-on-red-hat/
First, ensure you have the following packages installed:
- readline
- readline-devel
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:
- ruby
- ruby-devel
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 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
Comment
Getting ruby gem mysql native extension to install on RHEL5 / CentOS 5 Installing CentOS via Netboot in VMWare
