no such file to load — readline (LoadError) in Rails 3.0.7 – Mandriva 2011 64

Problem

When you try to run the console rails c in a new Rails 3.0.7 application, in Mandriva 2011 64bit, and when you use rvm, you get the following error:

no such file to load -- readline (LoadError)

Solution

Similar to an earlier post here, the solution is as follows with the new requirements described

It’s quite like likely that the readline libraries are missing from your installation. To find out which ones go to the directory that the error is indicating (ie):

cd ~/.rvm/src/ruby-1.9..2-head

and then to the following:

cd ext/readline

then run the following:

ruby extconf.rb

If you get something like:
checking for readline/readline.h... no
checking for editline/readline.h... no

then you are probably missing the neccessary header files for readline.
so install them in your system (ie in Mandriva):

sudo urpmi lib64readline-dev,

When the package is installed successfully run the following again:

ruby extconf.rb
make
sudo make install

You should now be able to go back to your project and run rails c with no errors.