Yesterday I ran into a problem on a existing Ruby installation on a Centos server. When I tried to access script/console, I got the following error:
require’: no such file to load — readline (LoadError)
Doh! Turns out, the solution is to simply compile readline again.
So you need to download Ruby again:
tar xvfz ruby-1.8.7-p72.tar.gz
and we’ll compile it:
sudo make install
If you face any error related to readline-devel while compiling readline, it can be solved by installing readline-devel:
sudo yum install readline-devel
And that’s it. Readline working again and script/console too.