Forum: Ruby on Rails Missing readline

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
753038ae16700c0fd9a5e1d2e80f68f6?d=identicon&s=25 Lee (Guest)
on 2009-03-18 23:33
(Received via mailing list)
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)

***

I have seen this error referred to in other posts but I am still
unsure how to install 'readline' on my system.

fyi, I have compiled Ruby 1.8.7 from source and installed the Rails
2.2.2 gem.

Thanks.
81b61875e41eaa58887543635d556fca?d=identicon&s=25 Frederick Cheung (Guest)
on 2009-03-19 00:13
(Received via mailing list)
On Mar 18, 10:32 pm, Lee <Lee.Longm...@googlemail.com> wrote:
> 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
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (conradwt)
on 2009-03-19 02:46
(Received via mailing list)
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

Sent from my iPhone
753038ae16700c0fd9a5e1d2e80f68f6?d=identicon&s=25 Lee (Guest)
on 2009-03-19 10:26
(Received via mailing list)
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
This topic is locked and can not be replied to.