tags:

views:

116

answers:

3

Hi. I'm (extremely) new to Ruby, having started today.

I just moved from my system's Ruby 1.8 installation to Ruby 1.9, compiled from source. In doing so, irb has taken a turn for the worse. It reacts in a most unfriendly way to the non-alphanumeric control keys:

UP key prints: ^[[A

DOWN key prints: ^[[B

DELETE key prints: ^[[3~

...and so on. The main result of this for me is that I have no access to previously issued commands. Nor does tab-completion work; though none of this seems to be an issue with Wirble - the same happens when I remove my ~/.irbrc.

I'm using:

  • Ubuntu 9.10
  • GNOME Terminal 2.28.1
  • ruby 1.9.1p376 (2009-12-07 revision 26041) [i686-linux]
  • Irb version 0.9.5 (05/04/13)

Any ideas? :(

+2  A: 

This could be a readline issue. You could try installing libreadline and libreadline-dev packages and rebuild Ruby after that, see if it helps:

apt-get install libreadline5 libreadline5-dev
Oleg Shaldybin
You hit the nail precisely on the head there. Many thanks!
eegg
A: 

If you use OS X Snow Leopard and have the same problem there is a description how to fix it here: http://snippets.dzone.com/posts/show/10511

gabrielf
A: 

readline is the correct answer. just wanted to say that for os x, you can install readline via homebrew.

rubiii