Question

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? :(

Was it helpful?

Solution

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

OTHER TIPS

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top