If you get
Loading development environment (Rails 2.3.2)
require': no such file to load -- readline (LoadError) from /usr/local/lib/ruby/1.8/irb/completion.rb:10 from /usr/local/lib/ruby/1.8/irb/init.rb:252:inrequire'
load_modules' from /usr/local/lib/ruby/1.8/irb/init.rb:250:ineach'
load_modules' from /usr/local/lib/ruby/1.8/irb/init.rb:21:insetup'
from /usr/local/lib/ruby/1.8/irb.rb:54:in `start'
when running script/console, you might be missing some libraries after you?ve installed Ruby from source. So you might try (Ubuntu, Debian):
sudo apt-get install libncurses5-dev
sudo apt-get install libreadline5-dev
Then cd to the folder with your unpacked Ruby sources, subfolder ext/readline:
sudo make install
There is no need to recompile Ruby. If you get any of these:
checking for tgetnum() in -lncurses... no
checking for tgetnum() in -ltermcap... no
checking for tgetnum() in -lcurses... no
checking for readline/readline.h... no
checking for editline/readline.h... no
you?re still missing libraries so re-check if the apt-get commands above completed without errors. Hope it helps.
Shih-gian Lee: Thank you, sir. Worked like a charm!
Christian: Thank you for the hint! Worked fine with my self compiled rails on Debian Lenny.
kongkoro: Worked for me thanks!!!
daniel spaniel: Thanks a tonnage. Finally found your solution which worked!
Lucas: Thank you it worked !!
Brock: It's all fun and games until someone compiles from source. Thank you for the tip!
dave: thanks for the secret knowlege! helped a lot. centOS people - it's a lil different, read this article http://blog.elctech.com/2009/01/09/fixing-ruby-no-such-file-to-load-readline-error-in-centos/
Ralf: Thank you very much. Worked nicely.
roger: Thanks for the tip. Barring this, you can also install the "pure ruby readline"
bainur: thank u, work like a magic :D
Hari: Thank you!!!
Denis: Thanks a lot!
magesh: That helped! thanks a lot
Pato: Thank you!!!
Gaziz T: Thanks! That did help me!
Rafael: Thanks!! That caused me problems to install ripl. Thanks again!