# IRB is dying on me

**URL:** <https://www.ruby-forum.com/t/irb-is-dying-on-me/115378>\
**Category:** Ruby\
**Created:** [September 24, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/irb-is-dying-on-me/115378 "2007-09-24T18:27:34Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [September 24, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/irb-is-dying-on-me/115378/1 "2007-09-24T18:27:34Z")

</div>

Why is it that I can’t repeat lines and edit them in IRB? If I press my  
cursor up key, normally, that repeats the line I just entered. Then, I  
can backspace and modify any part of that line I want before executing  
it. But, it’s dying on me. After I backspace a few characters, the  
cursor goes nuts, and, I’ve lost my instruction string. Has anyone else  
seen this behavior?

Thanks,  
Peter

---

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [September 24, 2007, 6:38pm UTC](https://www.ruby-forum.com/t/irb-is-dying-on-me/115378/2 "2007-09-24T18:38:53Z")

</div>

On Tue, 25 Sep 2007, Peter B. wrote:

> Why is it that I can’t repeat lines and edit them in IRB? If I press my  
> cursor up key, normally, that repeats the line I just entered. Then, I  
> can backspace and modify any part of that line I want before executing  
> it. But, it’s dying on me. After I backspace a few characters, the  
> cursor goes nuts, and, I’ve lost my instruction string. Has anyone else  
> seen this behavior?

Sounds like your missing readline support.

---

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [September 24, 2007, 6:41pm UTC](https://www.ruby-forum.com/t/irb-is-dying-on-me/115378/3 "2007-09-24T18:41:27Z")

</div>

Greg D. wrote:

> On Tue, 25 Sep 2007, Peter B. wrote:
> 
> > Why is it that I can’t repeat lines and edit them in IRB? If I press my  
> > cursor up key, normally, that repeats the line I just entered. Then, I  
> > can backspace and modify any part of that line I want before executing  
> > it. But, it’s dying on me. After I backspace a few characters, the  
> > cursor goes nuts, and, I’ve lost my instruction string. Has anyone else  
> > seen this behavior?
> 
> Sounds like your missing readline support.

Sorry, but, I don’t know what that is. Is that a gem I need to install?

---

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [September 24, 2007, 6:55pm UTC](https://www.ruby-forum.com/t/irb-is-dying-on-me/115378/4 "2007-09-24T18:55:33Z")

</div>

Greg D. wrote:

> On Tue, 25 Sep 2007, Peter B. wrote:
> 
> > > Sounds like your missing readline support.
> > 
> > Sorry, but, I don’t know what that is. Is that a gem I need to install?
> 
> Readline is the library that makes your irb behave more like a modern  
> shell. I added readline support to my Ruby when I compiled it.
> 
> –with-readline-dir=/usr/local

OK. Well, I’m on Windows and I didn’t compile anything. Ruby’s been  
“out-of-the-box” for me for almost a year now and it’s worked  
beautifully. I’ll look into it further. Thanks.

---

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [September 24, 2007, 6:50pm UTC](https://www.ruby-forum.com/t/irb-is-dying-on-me/115378/5 "2007-09-24T18:50:56Z")

</div>

On Tue, 25 Sep 2007, Peter B. wrote:

> > Sounds like your missing readline support.
> 
> Sorry, but, I don’t know what that is. Is that a gem I need to install?

Readline is the library that makes your irb behave more like a modern  
shell. I added readline support to my Ruby when I compiled it.

–with-readline-dir=/usr/local

---

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [September 25, 2007, 6:29am UTC](https://www.ruby-forum.com/t/irb-is-dying-on-me/115378/6 "2007-09-25T06:29:12Z")

</div>

On Sep 24, 2007, at 2:17 PM, Peter B. wrote:

> > > shell. I added readline support to my Ruby when I compiled it.  
> > > –  
> > > Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Ask yourself if you’ve installed anything recently (since you last  
remember it working) …  
Something could’ve clobbered something.  
Is your keyboard working in every app?  
Is it CygWin or something?

---

<div class="post-metadata">

**Author:** ![bodikp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e79b87/32.png) [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Post date:** [September 24, 2007, 9:17pm UTC](https://www.ruby-forum.com/t/irb-is-dying-on-me/115378/7 "2007-09-24T21:17:21Z")

</div>

Peter B. wrote:

> Greg D. wrote:
> 
> > On Tue, 25 Sep 2007, Peter B. wrote:
> > 
> > > > Sounds like your missing readline support.
> > > 
> > > Sorry, but, I don’t know what that is. Is that a gem I need to install?
> > 
> > Readline is the library that makes your irb behave more like a modern  
> > shell. I added readline support to my Ruby when I compiled it.
> > 
> > –with-readline-dir=/usr/local
> 
> OK. Well, I’m on Windows and I didn’t compile anything. Ruby’s been  
> “out-of-the-box” for me for almost a year now and it’s worked  
> beautifully. I’ll look into it further. Thanks.

Well, I tried everything including uninstalling and re-installing Ruby.  
But, it still isn’t working. This is very weird.
