Alex Rivera | Logout

no such file to load -- readline

Asked 2010-12-08T08:39:59.613
39

I am getting the following error:

$script/console
Loading development environment (Rails 2.2.2)
/opt/ruby-enterprise-1.8.6-20080709/lib/ruby/1.8/irb/completion.rb:10:in `require': no such file to load -- readline (LoadError)

Where can i get the file and what directory should it go in?

Thanks!

Edit
Report

1 Answer

31

You need to install the ncurses and readline libraries.

On Ubunutu you could do

sudo apt-get install libreadline5-dev libncurses5-dev

and then you will have to recompile readline which comes with your ruby source

cd <ruby-src-dir>/ext/readline
ruby extconf.rb
make
sudo make install

If you are using RVM you could simply do

rvm package install readline

EDIT:

On newer RVM versions, this last command is

rvm pkg install readline
answered 2010-12-08T09:21:06.547

Your Answer