# Getting up arrow to work in irb on OSX

**URL:** <https://rubytalk.org/t/getting-up-arrow-to-work-in-irb-on-osx/10751>\
**Category:** ruby-talk\
**Created:** [26 March 2004 00:54 UTC](https://rubytalk.org/t/getting-up-arrow-to-work-in-irb-on-osx/10751 "2004-03-26T00:54:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ptkwt](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Ptkwt](https://rubytalk.org/u/Ptkwt)\
**Post date:** [26 March 2004 00:54 UTC](https://rubytalk.org/t/getting-up-arrow-to-work-in-irb-on-osx/10751/1 "2004-03-26T00:54:28Z")

</div>

How do you get the up arrow to give prior commands in irb on OSX?

When I try to use the up arrow I just get garbage characters…

Phil

---

<div class="post-metadata">

**Author:** ![Ara.T.Howard](https://avatars.discourse-cdn.com/v4/letter/a/a8b319/32.png) [@Ara.T.Howard](https://rubytalk.org/u/Ara.T.Howard)\
**Post date:** [26 March 2004 03:14 UTC](https://rubytalk.org/t/getting-up-arrow-to-work-in-irb-on-osx/10751/2 "2004-03-26T03:14:27Z")

</div>

you need to compile with readline. probably readline is not installed or was  
not found when you installed. this should be in the config logs if you  
look…

-a

> **···**
>
> On 26 Mar 2004, Phil Tomson wrote:
> 
> > How do you get the up arrow to give prior commands in irb on OSX?
> > 
> > When I try to use the up arrow I just get garbage characters…
> 
> # –
> 
> > EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov  
> > PHONE :: 303.497.6469  
> > ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328  
> > URL :: [Solar-Terrestrial Physics Data | NCEI](http://www.ngdc.noaa.gov/stp/)  
> > TRY :: for l in ruby perl;do $l -e “print "\x3a\x2d\x29\x0a"”;done  
> > ===============================================================================

---

<div class="post-metadata">

**Author:** ![Sam\_Roberts1](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Sam\_Roberts1](https://rubytalk.org/u/Sam_Roberts1)\
**Post date:** [26 March 2004 03:40 UTC](https://rubytalk.org/t/getting-up-arrow-to-work-in-irb-on-osx/10751/3 "2004-03-26T03:40:12Z")

</div>

Quoteing [ptkwt@aracnet.com](mailto:ptkwt@aracnet.com), on Fri, Mar 26, 2004 at 09:54:28AM +0900:

> How do you get the up arrow to give prior commands in irb on OSX?
> 
> When I try to use the up arrow I just get garbage characters…

There’s a way you can do without recompiling (for 10.2, anyhow).

See:

[http://www.rubygarden.org/ruby?RubyOnMacintosh](http://www.rubygarden.org/ruby?RubyOnMacintosh)

Look for “OS X Ruby with readline”.

Cheers,  
Sam

---

<div class="post-metadata">

**Author:** ![Francis\_Hwang1](https://avatars.discourse-cdn.com/v4/letter/f/ecae2f/32.png) [@Francis\_Hwang1](https://rubytalk.org/u/Francis_Hwang1)\
**Post date:** [26 March 2004 20:59 UTC](https://rubytalk.org/t/getting-up-arrow-to-work-in-irb-on-osx/10751/4 "2004-03-26T20:59:26Z")

</div>

[ptkwt@aracnet.com](mailto:ptkwt@aracnet.com) (Phil Tomson) wrote in message news:[c3vtc00cqf@enews4.newsguy.com](mailto:c3vtc00cqf@enews4.newsguy.com)…

> How do you get the up arrow to give prior commands in irb on OSX?
> 
> When I try to use the up arrow I just get garbage characters…
> 
> Phil

Ya needs readline. Rich Kilmer wrote a great step-by-step about how to do this:

[http://richkilmer.blogs.com/ether/2003/10/building\_ruby\_1.html](http://richkilmer.blogs.com/ether/2003/10/building_ruby_1.html)

---

<div class="post-metadata">

**Author:** ![Laurent\_Julliard4](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@Laurent\_Julliard4](https://rubytalk.org/u/Laurent_Julliard4)\
**Post date:** [26 March 2004 08:39 UTC](https://rubytalk.org/t/getting-up-arrow-to-work-in-irb-on-osx/10751/5 "2004-03-26T08:39:27Z")

</div>

sidenote: I’m a windows user (ok, blame me ) and I think that irb has  
support for up-arrow even without readline (but no completion). It  
sounds strange that on \*nix this does not work 😕

side side note: someone else notices that he can’t type ‘[’ and ‘]’ on  
irb with readline ?  
I’m using the binaries from [http://jarp.jin.gr.jp/win32/](http://jarp.jin.gr.jp/win32/)

> **···**
>
> il Thu, 25 Mar 2004 20:02:22 -0700, “Ara.T.Howard” [ahoward@fattire.ngdc.noaa.gov](mailto:ahoward@fattire.ngdc.noaa.gov) ha scritto::
> 
> > On 26 Mar 2004, Phil Tomson wrote:
> > 
> > > How do you get the up arrow to give prior commands in irb on OSX?
> > > 
> > > When I try to use the up arrow I just get garbage characters…
> > 
> > you need to compile with readline. probably readline is not installed or was  
> > not found when you installed. this should be in the config logs if you  
> > look…

---

<div class="post-metadata">

**Author:** ![Ptkwt](https://avatars.discourse-cdn.com/v4/letter/p/f14d63/32.png) [@Ptkwt](https://rubytalk.org/u/Ptkwt)\
**Post date:** [26 March 2004 19:24 UTC](https://rubytalk.org/t/getting-up-arrow-to-work-in-irb-on-osx/10751/6 "2004-03-26T19:24:26Z")

</div>

In article [pnq760lia7gr01nur2rin3dgcm4umsdk7h@4ax.com](mailto:pnq760lia7gr01nur2rin3dgcm4umsdk7h@4ax.com),

> **···**
>
> gabriele renzi [surrender\_it@remove.yahoo.it](mailto:surrender_it@remove.yahoo.it) wrote:
> 
> > il Thu, 25 Mar 2004 20:02:22 -0700, “Ara.T.Howard” \>[ahoward@fattire.ngdc.noaa.gov](mailto:ahoward@fattire.ngdc.noaa.gov) ha scritto::
> > 
> > > On 26 Mar 2004, Phil Tomson wrote:
> > > 
> > > > How do you get the up arrow to give prior commands in irb on OSX?
> > > > 
> > > > When I try to use the up arrow I just get garbage characters…
> > > 
> > > you need to compile with readline. probably readline is not installed or was  
> > > not found when you installed. this should be in the config logs if you  
> > > look…
> > 
> > sidenote: I’m a windows user (ok, blame me ) and I think that irb has  
> > support for up-arrow even without readline (but no completion). It  
> > sounds strange that on \*nix this does not work 😕
> 
> Generally it does work. On my Linux box it works fine.
> 
> It might well work with the Ruby 1.6.8 that comes out of the box with  
> Panther, but I’ve gotten 1.8.1 from DarwinPorts.
> 
> Phil
