roll back to last command in irb

Discussion in 'Ruby' started by Ruby Newbee, Jan 10, 2010.

  1. Ruby Newbee

    Ruby Newbee Guest

    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.
     
    Ruby Newbee, Jan 10, 2010
    #1
    1. Advertising

  2. Ruby Newbee 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
    --
    Posted via http://www.ruby-forum.com/.
     
    Marvin Gülker, Jan 10, 2010
    #2
    1. Advertising

  3. Ruby Newbee

    Ruby Newbee Guest

    On Sun, Jan 10, 2010 at 5:40 PM, Marvin G=C3=BClker <> 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 Newbee, Jan 11, 2010
    #3
  4. 2010/1/11 Ruby Newbee <>:
    > On Sun, Jan 10, 2010 at 5:40 PM, Marvin G=FClker <> 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

    --=20
    remember.guy do |as, often| as.you_can - without end
    http://blog.rubybestpractices.com/
     
    Robert Klemme, Jan 11, 2010
    #4
  5. Albert Schlef, Jan 13, 2010
    #5
  6. 2010/1/13 Albert Schlef <>:
    > Robert Klemme wrote:
    >> You are aware that there is a packaged Ruby 1.9 available, are you?
    >>
    >> http://packages.ubuntu.com/karmic/ruby1.9

    >
    > 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/
     
    Robert Klemme, Jan 13, 2010
    #6
  7. >>
    >> 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 Nielsen
     
    Jonathan Nielsen, Jan 13, 2010
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. darrel
    Replies:
    5
    Views:
    483
  2. JenHu
    Replies:
    2
    Views:
    409
    William F. Robertson, Jr.
    Jan 28, 2005
  3. Sam Stephenson
    Replies:
    1
    Views:
    265
    Andrew Walrond
    Jun 18, 2005
  4. Replies:
    1
    Views:
    179
    Florian Groß
    Oct 26, 2005
  5. anne001
    Replies:
    1
    Views:
    310
    anne001
    Jun 27, 2006
Loading...

Share This Page