roll back to last command in irb

R

Ruby Newbee

Hello,

I'm using ruby under ubuntu Linux, ruby version is 1.9.1
What the problem is, when using irb I can't roll back the command to
the last one with "up" key in keyboard.
The result as below:

irb(main):001:0> File.file? "/etc/passwd"
=> true
irb(main):002:0> ^[[A # can't roll back here

Do you know how to configure irb to resolve it?

Thanks.
 
M

Marvin Gülker

Ruby said:
Hello,

I'm using ruby under ubuntu Linux, ruby version is 1.9.1
What the problem is, when using irb I can't roll back the command to
the last one with "up" key in keyboard.
The result as below:

irb(main):001:0> File.file? "/etc/passwd"
=> true
irb(main):002:0> ^[[A # can't roll back here

Do you know how to configure irb to resolve it?

Thanks.

Did you compile Ruby yourself? If so, install one of the packages
libreadline5-dev or libreadline6-dev and then compile again.

Marvin
 
R

Ruby Newbee

Did you compile Ruby yourself? If so, install one of the packages
libreadline5-dev or libreadline6-dev and then compile again.

Yes coz my ubuntu doesn't have a ruby pre-installed, so I got the
source from ruby-lang.org and installed it by hand.
I have resolved the problem following your suggestion. Thanks.
 
R

Robert Klemme

2010/1/13 Albert Schlef said:
BTW, there's also ruby1.9.1:

=A0http://packages.ubuntu.com/karmic/ruby1.9.1

Good point!
Which of these two packages should "we" install?

I'm talking about a development box, not a production one. I was
thinking that maybe ruby1.9 is a snapshot and therefore sometimes
wouldn't work. So I installed ruby1.9.1. Am I correct?

That's what I'd do, too.

robert


--=20
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/
 
J

Jonathan Nielsen

Ruby1.9 is an old release of ruby1.9.0, and is the only one available
on Ubuntu releases before Karmic. Ruby1.9.1 is ruby1.9.1 patchlevel
243 (in Karmic anyway) and is probably fine, but I personally compile
mine from source.

-Jonathan Nielsen
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top