Missing readline

I have installed Rails 2.2.2 on a Debian Lenny VPS and I am getting
the following error when trying to script/console.

I have installed Rails 2.2.2 on a Debian Lenny VPS and I am getting
the following error when trying to script/console.

***

Loading development environment (Rails 2.2.2)
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require': no such
file to load -- readline (LoadError)

It's probably because you didn't have the development headers for
readline. These are probably in a separate debian package (eg
libreadline-dev or something like that). Once you've got that try
building the readline extension again (cd to ruby source /ext/
readline, run ruby extconf.rb then the usual make && make install
dance)

Fred

Hi, you'll need to install the readline library and you should send a
note to the Ruby package maintainer for your platform to add this
dependency.

Good luck,

-Conrad

Hi,

Thanks for your help guys.

script/console works!

For the benefit of others, I now have the following libaries
installed:

*libreadline-ruby1.8
libreadline5
readline-common
*libreadline5-dev
*libncurses5-dev (dependency of libreadline5-dev)

Those marked with * were not present when I experienced the error.

Having installed the missing libraries using the aptitude package
manager, I then did as suggested by Fred:

cd /ext/readline (in Ruby source tree)
ruby extconf.rb
make
make install