# Up and down keys not working in IRB

**URL:** <https://rubytalk.org/t/up-and-down-keys-not-working-in-irb/38437>\
**Category:** ruby-talk\
**Created:** [18 June 2007 11:40 UTC](https://rubytalk.org/t/up-and-down-keys-not-working-in-irb/38437 "2007-06-18T11:40:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_Church](https://avatars.discourse-cdn.com/v4/letter/f/65b543/32.png) [@Frank\_Church](https://rubytalk.org/u/Frank_Church)\
**Post date:** [18 June 2007 11:40 UTC](https://rubytalk.org/t/up-and-down-keys-not-working-in-irb/38437/1 "2007-06-18T11:40:53Z")

</div>

The up and down keys need to get the command history is not working in  
IRB.

They produce ^[[A, ^[[B, ^[[C etc. I am connecting over PuTTY to Fedora  
6and I wonder whether the problem is in IRB.

If after logging in to the Fedora 6 account, I login to my dreamhost  
account and run IRB the keys work fine. I compiled the ruby with  
readline and I suspect that something didn't go right.

Is there some way of checking it?

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Todd\_Benson](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@Todd\_Benson](https://rubytalk.org/u/Todd_Benson)\
**Post date:** [18 June 2007 16:19 UTC](https://rubytalk.org/t/up-and-down-keys-not-working-in-irb/38437/2 "2007-06-18T16:19:19Z")

</div>

Replace /usr/local/build/ruby-1.8.6 with your ruby build directory below.

$ irb  
irb(main):001:0\> $LOADED\_FEATURES.grep /readline/  
=\> ["readline.so"]  
irb(main):002:0\> require 'readline' #already loaded, so should return false  
=\> false  
irb(main):003:0\> exit  
$ less /usr/local/build/ruby-1.8.6/ext/readline/mkmf.log

hth,  
Todd

> **···**
>
> On 6/18/07, Frank Church \<vfcforums@gmail.com\> wrote:
> 
> > The up and down keys need to get the command history is not working in  
> > IRB.
> > 
> > They produce ^[[A, ^[[B, ^[[C etc. I am connecting over PuTTY to Fedora  
> > 6and I wonder whether the problem is in IRB.
> > 
> > If after logging in to the Fedora 6 account, I login to my dreamhost  
> > account and run IRB the keys work fine. I compiled the ruby with  
> > readline and I suspect that something didn't go right.
> > 
> > Is there some way of checking it?
