# \[slightly OT\] up key doesn't work in irb

**URL:** <https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289>\
**Category:** ruby-talk\
**Created:** [22 March 2003 12:14 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289 "2003-03-22T12:14:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Emmanuel\_Touzery](https://avatars.discourse-cdn.com/v4/letter/e/e274bd/32.png) [@Emmanuel\_Touzery](https://rubytalk.org/u/Emmanuel_Touzery)\
**Post date:** [22 March 2003 12:14 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289/1 "2003-03-22T12:14:50Z")

</div>

Hello,

```
I had ruby 1.6.2 which came with my mandrake 8.0. I just upgraded to ruby 

```

1.6.8 (compiled from source), and now in irb the “up” key doesn’t work  
anymore, instead ^[[A is displayed on the screen…

```
I'm sorry if it's basic UNIX/linux knowledge.. I don't find anything on 

```

google, also because google scrambles the string “^[[A”.  
And in the time being programming in ruby has become horrible, as I really  
depended in this irb feature…

```
thank for any answer,

```

emmanuel

> **···**
>
> –  
> “Droit devant soi, on ne peut pas aller bien loin”  
> - Le petit prince, Antoine de Saint Exupéry

---

<div class="post-metadata">

**Author:** ![ts1](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@ts1](https://rubytalk.org/u/ts1)\
**Post date:** [22 March 2003 12:20 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289/2 "2003-03-22T12:20:13Z")

</div>

> &nbsp;&nbsp;I had ruby 1.6.2 which came with my mandrake 8.0. I just upgraded to ruby  
> 1.6.8 (compiled from source), and now in irb the "up" key doesn't work  
> anymore, instead ^[[A is displayed on the screen...

Verify that ruby has build the extension readline

pigeon% ruby -rreadline -e 1  
pigeon%

If it give an error, goto ruby-1.6.8/ext/readline and run

&nbsp;&nbsp;ruby extconf.rb

to see if it give an error message

Guy Decoux

---

<div class="post-metadata">

**Author:** ![Emmanuel\_Touzery](https://avatars.discourse-cdn.com/v4/letter/e/e274bd/32.png) [@Emmanuel\_Touzery](https://rubytalk.org/u/Emmanuel_Touzery)\
**Post date:** [22 March 2003 12:29 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289/3 "2003-03-22T12:29:21Z")

</div>

THANK YOU.

installing readline-devel and recompiling ruby fixed it… wow, that was a  
fast and accurate answer :O)

emmanuel, back on track

> **···**
>
> On Saturday 22 of March 2003 13:20, ts wrote:
> 
> > Verify that ruby has build the extension readline
> > 
> > pigeon% ruby -rreadline -e 1  
> > pigeon%
> 
> –  
> “Droit devant soi, on ne peut pas aller bien loin”  
> - Le petit prince, Antoine de Saint Exupéry

---

<div class="post-metadata">

**Author:** ![Shashank\_Date2](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Shashank\_Date2](https://rubytalk.org/u/Shashank_Date2)\
**Post date:** [22 March 2003 15:28 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289/4 "2003-03-22T15:28:50Z")

</div>

“ts” [decoux@moulon.inra.fr](mailto:decoux@moulon.inra.fr) wrote in message

Hello Guy,

I am using ruby 1.6.8 (2002-12-24) [i586-mswin32] installed with PragProg’s  
one-click installer on Windows.  
I do not have “up” key problem in irb.  
But I know that readline my version of ruby does not have readline support,  
because …

> > I had ruby 1.6.2 which came with my mandrake 8.0. I just upgraded to  
> > ruby  
> > 1.6.8 (compiled from source), and now in irb the “up” key doesn’t work  
> > anymore, instead ^[[A is displayed on the screen…
> 
> Verify that ruby has build the extension readline
> 
> pigeon% ruby -rreadline -e 1  
> pigeon%

… when I do this I get an error :

ruby: No such file to load – readline (LoadError)

> If it give an error, goto ruby-1.6.8/ext/readline and run
> 
> ruby extconf.rb

So will I have some other problems down the road?

This question is for those involved: is readline support on Win32 planed in  
future ?

---

<div class="post-metadata">

**Author:** ![ts1](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@ts1](https://rubytalk.org/u/ts1)\
**Post date:** [22 March 2003 16:51 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289/5 "2003-03-22T16:51:58Z")

</div>

> So will I have some other problems down the road?

No, you just don't have access to this extension : this just mean that you  
can't use cursor key with irb (just like with the old DOS) but irb still  
work fine.

Guy Decoux

---

<div class="post-metadata">

**Author:** ![Shashank\_Date2](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Shashank\_Date2](https://rubytalk.org/u/Shashank_Date2)\
**Post date:** [22 March 2003 17:29 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289/6 "2003-03-22T17:29:03Z")

</div>

“ts” [decoux@moulon.inra.fr](mailto:decoux@moulon.inra.fr) wrote in message

> No, you just don’t have access to this extension :

So there are some programs I won’t be able to run. Right?

> this just mean that you can’t use cursor key with irb

By cursor keys, if you mean the up-down-left-right arrow keys,  
then I have confirmed that I can use them in IRB even without the extension.

But that may be part of the native windows magic because I can  
do that even at the command prompt:C:\>

Thanks for you help.  
– shanko

---

<div class="post-metadata">

**Author:** ![ts1](https://avatars.discourse-cdn.com/v4/letter/t/a8b319/32.png) [@ts1](https://rubytalk.org/u/ts1)\
**Post date:** [22 March 2003 17:34 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289/7 "2003-03-22T17:34:20Z")

</div>

> So there are some programs I won't be able to run. Right?

Well, readline is just to have access to up-down-left-right arrow keys :  
if these keys work in irb without this extension this just mean that on  
Windows you don't need it and you'll able to run any programs.

Guy Decoux

---

<div class="post-metadata">

**Author:** ![Shashank\_Date2](https://avatars.discourse-cdn.com/v4/letter/s/e99b99/32.png) [@Shashank\_Date2](https://rubytalk.org/u/Shashank_Date2)\
**Post date:** [22 March 2003 19:29 UTC](https://rubytalk.org/t/slightly-ot-up-key-doesnt-work-in-irb/5289/8 "2003-03-22T19:29:35Z")

</div>

“ts” [decoux@moulon.inra.fr](mailto:decoux@moulon.inra.fr) wrote in message

> Well, readline is just to have access to up-down-left-right arrow keys :  
> if these keys work in irb without this extension this just mean that on  
> Windows you don’t need it and you’ll able to run any programs.

Got it !

> Guy Decoux

Thanks, Guy.
