# Command buffer in irb

**URL:** <https://www.ruby-forum.com/t/command-buffer-in-irb/48565>\
**Category:** Ruby\
**Created:** [November 22, 2005, 7:34am UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565 "2005-11-22T07:34:22Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![toddkennethbenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Post date:** [November 22, 2005, 7:34am UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565/1 "2005-11-22T07:34:22Z")

</div>

So I decided to try out Ubuntu on a different partition. I built Ruby  
1.8.3, and now in irb I can’t hit the up arrow to bring up my last  
command(s). Is there a way to set this up? I’m asking because I’m a  
terrible typist and require this much-needed tool (crutch).

Thanks,  
Todd

---

<div class="post-metadata">

**Author:** ![toddkennethbenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Post date:** [November 22, 2005, 7:54am UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565/2 "2005-11-22T07:54:29Z")

</div>

> So I decided to try out Ubuntu on a different partition. I built Ruby  
> 1.8.3, and now in irb I can’t hit the up arrow to bring up my last  
> command(s). Is there a way to set this up? I’m asking because I’m a  
> terrible typist and require this much-needed tool (crutch).

Before building ruby, check you have installed the following packages:  
libreadline[4 or 5]-dev  
libncurses[5 or w5]-dev

Regard,  
Yuri Kozlov

---

<div class="post-metadata">

**Author:** ![toddkennethbenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Post date:** [November 22, 2005, 7:54am UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565/3 "2005-11-22T07:54:29Z")

</div>

On Nov 21, 2005, at 10:32 PM, Todd wrote:

> So I decided to try out Ubuntu on a different partition. I built Ruby  
> 1.8.3, and now in irb I can’t hit the up arrow to bring up my last  
> command(s). Is there a way to set this up? I’m asking because I’m a  
> terrible typist and require this much-needed tool (crutch).

Sounds like you’re missing libreadline

---

<div class="post-metadata">

**Author:** ![toddkennethbenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Post date:** [November 22, 2005, 9:19am UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565/4 "2005-11-22T09:19:00Z")

</div>

Hi,

At Tue, 22 Nov 2005 16:57:23 +0900,  
Todd wrote in [ruby-talk:166942]:

> Nope. I recompiled, then deleted the whole installation, reunpacked,  
> recompiled (seeing no warning or error during the compile when it  
> linked with readline), and even tried “irb --readline” in case that  
> might help. Still does the same thing. I press up-arrow, and it just  
> returns ^]]A to the screen, which I’m assuming is the control  
> character. If anybody can point me into some direction pertaining to  
> this, it would be much appreciated.

Show ext/readline/mkmf.log file.

---

<div class="post-metadata">

**Author:** ![toddkennethbenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Post date:** [November 22, 2005, 9:43am UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565/5 "2005-11-22T09:43:10Z")

</div>

On 2005-11-22, Eric H. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> On Nov 21, 2005, at 10:32 PM, Todd wrote:
> 
> > So I decided to try out Ubuntu on a different partition. I built Ruby  
> > 1.8.3, and now in irb I can’t hit the up arrow to bring up my last  
> > command(s). Is there a way to set this up? I’m asking because I’m a  
> > terrible typist and require this much-needed tool (crutch).
> 
> Sounds like you’re missing libreadline

Look in ext/readline/mkmf.log to see why Ruby misses it.

Usually headerfiles are not found. Can’t imagine Ubuntu doing something  
special with them, tho.

Doing  
require ‘readline’  
in Ruby may also tell you something extra. On the command line  
ldd /path/to/local/ruby/i?86-linux/readline.so  
might help you. Finally, check whether you are running the Ruby you  
think  
you are running,  
type -a ruby  
and ruby -v for all of them if it’s more than one.

Hth,  
Kero.

---

<div class="post-metadata">

**Author:** ![toddkennethbenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Post date:** [November 22, 2005, 8:14am UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565/6 "2005-11-22T08:14:36Z")

</div>

Yuri Kozlov wrote:

> Yuri Kozlov  
> No, I don’t think that’s it. I have both of those and using the up  
> arrow in a terminal works fine. It’s just irb. Some kind of character  
> mapping that isn’t happening? Maybe some error during the compile that  
> I missed? I’ll try building again and see if I can grab any  
> errors/warnings.

---

<div class="post-metadata">

**Author:** ![toddkennethbenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Post date:** [November 22, 2005, 8:58am UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565/7 "2005-11-22T08:58:55Z")

</div>

Todd wrote:

> > Regard,  
> > Yuri Kozlov
> 
> No, I don’t think that’s it. I have both of those and using the up  
> arrow in a terminal works fine. It’s just irb. Some kind of character  
> mapping that isn’t happening? Maybe some error during the compile that  
> I missed? I’ll try building again and see if I can grab any  
> errors/warnings.

Nope. I recompiled, then deleted the whole installation, reunpacked,  
recompiled (seeing no warning or error during the compile when it  
linked with readline), and even tried “irb --readline” in case that  
might help. Still does the same thing. I press up-arrow, and it just  
returns ^]]A to the screen, which I’m assuming is the control  
character. If anybody can point me into some direction pertaining to  
this, it would be much appreciated.

Thanks,  
Todd

---

<div class="post-metadata">

**Author:** ![toddkennethbenson](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/48db29/32.png) [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Post date:** [November 22, 2005, 10:08pm UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565/8 "2005-11-22T22:08:25Z")

</div>

Kero wrote:

> Look in ext/readline/mkmf.log to see why Ruby misses it.  
> type -a ruby  
> and ruby -v for all of them if it’s more than one.
> 
> Hth,  
> Kero.

Thanks a lot, you guys. mkmf.log revealed that I was missing ncurses  
of all things!

Works great now.

Todd
