Running script/console provides the delightful answer:
/usr/local/lib/ruby/1.8/irb/completion.rb:10:in `require’:
no such file to load – readline (LoadError)
Turns out that Kubuntu doesn’t have the curses libraries.
Here’s the begining of a solution
apt-get install libncurses5-dev libreadline5-dev (Ubuntu/Debian)
Then recompile the readline extension and go from there.
cd ext/readline
ruby extconf.rb
make
sudo make install
Niether does ubuntu (well that was pretty obvious if kububtu didnt have them) but thanks for this, i was so confused..
thanks for your blog on this. im using ubuntu. i followed your instructions. now my irb has tab completion! thanks a rubillion! :)
Thank you for the kind words. I’m thrilled you found this useful!
exactly how does one go about “recompiling the readline extension”?
Pete,
assuming you’ve compiled ruby from source, or you have the source available, you would go in the ext/readline directory of your ruby source. From there, typying
ruby extconf.rb
make clean
sudo make install
should do it.
If you have not installed ruby from source, you might be able to get away from getting the source and compiling readline by itself. In my case, the available version of ruby via apt-get was older, so I went for ruby 1.8.4 but readline didn’t build when I first went through the install because of the missing dependencies.
thank you very much. it fixed my problem on my ubuntu.
Merci beaucoup :)
Glad you found this helpful!
Thanks much!
thanks for the tips :)
Thank you! I built ruby 1.8.6 from the source and had this problem.