irb on Mac OS X not displaying previous lines

T

Tom Robinson

I just started using irb on my Mac. When I press the Up arrow I should
see the previously entered line, right? Instead it writes "^[[A" to the
prompt. I've tried Terminal.app, iTerm, and xterm within X11, all do the
same thing. Any ideas?

Thanks,

Tom
 
E

Elliot Temple

I just started using irb on my Mac. When I press the Up arrow I should
see the previously entered line, right? Instead it writes "^[[A" to
the
prompt. I've tried Terminal.app, iTerm, and xterm within X11, all
do the
same thing. Any ideas?

i believe you need to install readline


-- Elliot Temple
http://www.curi.us/blog/
 
C

Craig Demyanovich

I just started using irb on my Mac. When I press the Up arrow I should
see the previously entered line, right? Instead it writes "^[[A" to
the
prompt. I've tried Terminal.app, iTerm, and xterm within X11, all
do the
same thing. Any ideas?

Works for me in Terminal.

Mac OS X 10.4.7
Ruby 1.8.4 via DarwinPorts (http://darwinports.opendarwin.org/)

Craig
 
C

Craig Demyanovich

I just started using irb on my Mac. When I press the Up arrow I
should
see the previously entered line, right? Instead it writes "^[[A"
to the
prompt. I've tried Terminal.app, iTerm, and xterm within X11, all
do the
same thing. Any ideas?

i believe you need to install readline

Ruby 1.8.4 from DarwinPorts depends on readline, so it's installed
for me. Recently, I found that the readline version from DarwinPorts
was updated. I installed it and broke Ruby stuff. I simply
deactivated the new one (5.1.x) and reactivated the old one (5.0.x).

Craig
 
T

Tom Robinson

Craig said:
Ruby 1.8.4 from DarwinPorts depends on readline, so it's installed
for me. Recently, I found that the readline version from DarwinPorts
was updated. I installed it and broke Ruby stuff. I simply
deactivated the new one (5.1.x) and reactivated the old one (5.0.x).

Craig

Ok, I installed readline from Darwin Ports, but as you said its version
5.1. Is it possible to downgrade to an older version with Darwin Ports?

I tried building 5.0.5 from source
(http://cnswww.cns.cwru.edu/~chet/readline/rltop.html) but it failed.
 
R

Ryan Davis

I just started using irb on my Mac. When I press the Up arrow I should
see the previously entered line, right? Instead it writes "^[[A" to
the
prompt. I've tried Terminal.app, iTerm, and xterm within X11, all
do the
same thing. Any ideas?

You need not do anything but build your own ruby and move the stock
ruby aside (eg sudo mv /usr/bin/ruby /usr/bin/ruby182). OSX ships
with libedit and it works fine with no extra configuration options.
 
T

Tom Robinson

Ryan said:
I just started using irb on my Mac. When I press the Up arrow I should
see the previously entered line, right? Instead it writes "^[[A" to
the
prompt. I've tried Terminal.app, iTerm, and xterm within X11, all
do the
same thing. Any ideas?

You need not do anything but build your own ruby and move the stock
ruby aside (eg sudo mv /usr/bin/ruby /usr/bin/ruby182). OSX ships
with libedit and it works fine with no extra configuration options.

Yup, that did I. I installed from Darwin Ports.

Thanks.
 
M

Michal Suchanek

I just started using irb on my Mac. When I press the Up arrow I
should
see the previously entered line, right? Instead it writes "^[[A"
to the
prompt. I've tried Terminal.app, iTerm, and xterm within X11, all
do the
same thing. Any ideas?

i believe you need to install readline

Ruby 1.8.4 from DarwinPorts depends on readline, so it's installed
for me. Recently, I found that the readline version from DarwinPorts
was updated. I installed it and broke Ruby stuff. I simply
deactivated the new one (5.1.x) and reactivated the old one (5.0.x).

It also works for me with ruby from Fink :)

Thanks

Michal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top