Roll back to last command in irb

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.

On Sun, Jan 10, 2010 at 5:40 PM, Marvin Gülker [email protected] wrote:

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.

Ruby N. wrote:

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

2010/1/11 Ruby N. [email protected]:

On Sun, Jan 10, 2010 at 5:40 PM, Marvin Gülker [email protected] wrote:

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.

You are aware that there is a packaged Ruby 1.9 available, are you?

http://packages.ubuntu.com/karmic/ruby1.9

Kind regards

robert

Robert K. wrote:

You are aware that there is a packaged Ruby 1.9 available, are you?

Ubuntu – Error

BTW, there’s also ruby1.9.1:

Ubuntu – Error

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?

2010/1/13 Albert S. [email protected]:

Robert K. wrote:

You are aware that there is a packaged Ruby 1.9 available, are you?

Ubuntu – Error

BTW, there’s also ruby1.9.1:

Ubuntu – Error

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

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?

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 N.