# Missing readline

**URL:** <https://www.ruby-forum.com/t/missing-readline/163295>\
**Category:** Rails\
**Created:** [March 18, 2009, 11:33pm UTC](https://www.ruby-forum.com/t/missing-readline/163295 "2009-03-18T23:33:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://www.ruby-forum.com/u/lee)\
**Post date:** [March 18, 2009, 11:33pm UTC](https://www.ruby-forum.com/t/missing-readline/163295/1 "2009-03-18T23:33:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://www.ruby-forum.com/u/lee)\
**Post date:** [March 19, 2009, 12:13am UTC](https://www.ruby-forum.com/t/missing-readline/163295/2 "2009-03-19T00:13:27Z")

</div>

On Mar 18, 10:32 pm, Lee [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://www.ruby-forum.com/u/lee)\
**Post date:** [March 19, 2009, 2:46am UTC](https://www.ruby-forum.com/t/missing-readline/163295/3 "2009-03-19T02:46:45Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![lee](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/bc8723/32.png) [@lee](https://www.ruby-forum.com/u/lee)\
**Post date:** [March 19, 2009, 10:26am UTC](https://www.ruby-forum.com/t/missing-readline/163295/4 "2009-03-19T10:26:52Z")

</div>

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
