IRB Keyboard Input Issues

When I press the up arrow in IRB to access history I see this:
^[[A

I’m running it over SSH with PuTTy but BASH history works just fine.

On 11 Jan 2008, at 17:12, Oliver S. wrote:

When I press the up arrow in IRB to access history I see this:
^[[A

I’m running it over SSH with PuTTy but BASH history works just fine.

Is the ruby you’ve got on your remote server built with readline ?

Fred

Is the ruby you’ve got on your remote server built with readline ?

It’s 1.8.6, I used configure without any args when I built it.

Which OS are you using. On Solaris for example you have normally thsi
beahvior because readline is missing. You have to provide then first
readline and tell ruby that readline is avaiable (extend the Library
path,
and I think there is a option --with-readline).

Regards,
Tammo

Which OS are you using.
SSH from Windows to Ubuntu Linux

You have to provide then first readline and tell ruby that readline is
avaiable (extend the Library path, and I think there is a option
–with-readline).

Umm…come again.

did you installed build dependencies for ruby?

sudo apt-get build-dep ruby1.8

I compiled it, I didn’t install it from a package. If I was missing a
dependency I would have been told, surely? The compile was successful.

On 11 ene, 15:26, Oliver S. [email protected] wrote:

Is the ruby you’ve got on your remote server built with readline ?

It’s 1.8.6, I used configure without any args when I built it.

did you installed build dependencies for ruby?

sudo apt-get build-dep ruby1.8

Hi, this is Yu-raku-an,

Oliver S. wrote:

did you installed build dependencies for ruby?

sudo apt-get build-dep ruby1.8

I compiled it, I didn’t install it from a package. If I was missing a
dependency I would have been told, surely? The compile was successful.

I think it may be because you do not have the sources of readline
library in your development environment.
Install them via your package system or any other way,
(readline-devel.i386 package for ‘yum’ on CentOS, for example)
and and go to ext/readline/, run ‘ruby extconf.rb’.

Thank you.

It’s 1.8.6, I used configure without any args when I built it.

readline will only be built if ruby can find the header files. Many
distributions cripple the installation by not providing the headers by
default for various
arbitrary reasons.

Once you sorted this readline problem (you know, this apt-get hassle or
yum or rpm…), go to your extracted ruby archive.

Do
cd ext/readline; ruby extconf.rb; make

That should give you readline support in ruby (i think it will also
complain
if it encounters a problem therein)

I think there is a option --with-readline

Unfortunately there is not.

Thanks guys I’ll give some of these a try later.

Oliver S. wrote:

did you installed build dependencies for ruby?

sudo apt-get build-dep ruby1.8

I compiled it, I didn’t install it from a package. If I was missing a
dependency I would have been told, surely? The compile was successful.

Look in ext/readline/. Does readline.o exist? If not, what does mkmf.log
say? Or, just run

ruby extconf.rb

in that dir and see if there are any failures.

Pawel Barcik wrote:

That worked for me thx

I have had success too, with some slight additions to the above.

I have Ruby 1.9.1p129 and had the problem with the upward cursor key not
showing the previous keyboard input.

I had installed readline-devel in Yast (OpenSUSE 11.1) and that didn’t
make a difference.

I then ran extconf.rb from its directory and noticed it built a
Makefile, so I ran ‘make’ and ‘make install’ with zero errors.

I then opened irb, entered some code, ran it, then pressed the ‘up’ key
and it displayed the code I had inputted.

Result!

That worked for me thx

So thiis works for me:
Install dev libraries of readline
run extconf.rb on /ext/readline
run make and make install.