Forum: Ruby Command buffer in irb

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2cef22e5d84ec3cdc107a5f9f97537e5?d=identicon&s=25 toddkennethbenson (Guest)
on 2005-11-22 07:34
(Received via mailing list)
So I decided to try out Ubuntu on a different partition.  I built Ruby
1.8.3, and now in irb I can't hit the up arrow to bring up my last
command(s).  Is there a way to set this up?  I'm asking because I'm a
terrible typist and require this much-needed tool (crutch).

Thanks,
Todd
22b74ae3adfc74ff5c7c0b0a94b78a48?d=identicon&s=25 kozlov.y (Guest)
on 2005-11-22 07:54
(Received via mailing list)
>So I decided to try out Ubuntu on a different partition.  I built Ruby
>1.8.3, and now in irb I can't hit the up arrow to bring up my last
>command(s).  Is there a way to set this up?  I'm asking because I'm a
>terrible typist and require this much-needed tool (crutch).

Before building ruby, check you have installed the following packages:
libreadline[4 or 5]-dev
libncurses[5 or w5]-dev

Regard,
Yuri Kozlov
58479f76374a3ba3c69b9804163f39f4?d=identicon&s=25 drbrain (Guest)
on 2005-11-22 07:54
(Received via mailing list)
On Nov 21, 2005, at 10:32 PM, Todd wrote:

> So I decided to try out Ubuntu on a different partition.  I built Ruby
> 1.8.3, and now in irb I can't hit the up arrow to bring up my last
> command(s).  Is there a way to set this up?  I'm asking because I'm a
> terrible typist and require this much-needed tool (crutch).

Sounds like you're missing libreadline
2cef22e5d84ec3cdc107a5f9f97537e5?d=identicon&s=25 toddkennethbenson (Guest)
on 2005-11-22 08:14
(Received via mailing list)
Yuri Kozlov wrote:
> Yuri Kozlov
No, I don't think that's it.  I have both of those and using the up
arrow in a terminal works fine.  It's just irb.  Some kind of character
mapping that isn't happening?  Maybe some error during the compile that
I missed?  I'll try building again and see if I can grab any
errors/warnings.
2cef22e5d84ec3cdc107a5f9f97537e5?d=identicon&s=25 toddkennethbenson (Guest)
on 2005-11-22 08:58
(Received via mailing list)
Todd wrote:
> > Regard,
> > Yuri Kozlov
>
> No, I don't think that's it.  I have both of those and using the up
> arrow in a terminal works fine.  It's just irb.  Some kind of character
> mapping that isn't happening?  Maybe some error during the compile that
> I missed?  I'll try building again and see if I can grab any
> errors/warnings.

Nope.  I recompiled, then deleted the whole installation, reunpacked,
recompiled (seeing no warning or error during the compile when it
linked with readline), and even tried "irb --readline" in case that
might help.  Still does the same thing.  I press up-arrow, and it just
returns ^]]A to the screen, which I'm assuming is the control
character.  If anybody can point me into some direction pertaining to
this, it would be much appreciated.

Thanks,
Todd
04a56914cc09f0858d3fca2bf4cbde34?d=identicon&s=25 nobuyoshi.nakada (Guest)
on 2005-11-22 09:19
(Received via mailing list)
Hi,

At Tue, 22 Nov 2005 16:57:23 +0900,
Todd wrote in [ruby-talk:166942]:
> Nope.  I recompiled, then deleted the whole installation, reunpacked,
> recompiled (seeing no warning or error during the compile when it
> linked with readline), and even tried "irb --readline" in case that
> might help.  Still does the same thing.  I press up-arrow, and it just
> returns ^]]A to the screen, which I'm assuming is the control
> character.  If anybody can point me into some direction pertaining to
> this, it would be much appreciated.

Show ext/readline/mkmf.log file.
Dd54c22454b4e3c21cadf3bdb5192e28?d=identicon&s=25 kero (Guest)
on 2005-11-22 09:43
(Received via mailing list)
On 2005-11-22, Eric Hodel <drbrain@segment7.net> wrote:
> On Nov 21, 2005, at 10:32 PM, Todd wrote:
>
>> So I decided to try out Ubuntu on a different partition.  I built Ruby
>> 1.8.3, and now in irb I can't hit the up arrow to bring up my last
>> command(s).  Is there a way to set this up?  I'm asking because I'm a
>> terrible typist and require this much-needed tool (crutch).
>
> Sounds like you're missing libreadline

Look in ext/readline/mkmf.log to see why Ruby misses it.

Usually headerfiles are not found. Can't imagine Ubuntu doing something
special with them, tho.

Doing
  require 'readline'
in Ruby may also tell you something extra. On the command line
  ldd /path/to/local/ruby/i?86-linux/readline.so
might help you. Finally, check whether you are running the Ruby you
think
you are running,
  type -a ruby
and ruby -v for all of them if it's more than one.

Hth,
Kero.
2cef22e5d84ec3cdc107a5f9f97537e5?d=identicon&s=25 toddkennethbenson (Guest)
on 2005-11-22 22:08
(Received via mailing list)
Kero wrote:
> Look in ext/readline/mkmf.log to see why Ruby misses it.
>   type -a ruby
> and ruby -v for all of them if it's more than one.
>
> Hth,
> Kero.

Thanks a lot, you guys.  mkmf.log revealed that I was missing ncurses
of all things!

Works great now.

Todd
This topic is locked and can not be replied to.