Readline doesn't work no matter what I do

H

Hee-Seng Kye

I've spent hours reading the related threads at the ruby-talk archive and
trying all the suggestions, and still can't get Readline work under irb.

I just installed Ruby 1.8.2 on Mac OS X 10.3.7. During irb session, when I
arrow-up to get the previously executed command, as you would on your Unix
shell, I get the following:

irb(main):001:0> 3 + 4
=> 7
irb(main):002:0> ^[[A <= when I arrow-up

Is there a way to configure irb so that I get the following:

irb(main):001:0> 3 + 4
=> 7
irb(main):002:0> 3 + 4 <= when I arrow-up

I've installed Readline 5.0 and made a proper symlink (thanks to Thomas for
the suggestion), and I'm still having the same problem!!!

I would highly appreciate it if anyone could let me know what needs to be
done.

Thank you.
 
C

CT

I've spent hours reading the related threads at the ruby-talk archive and
trying all the suggestions, and still can't get Readline work under irb.

Have you tried starting irb as "irb --readline" ?

Or, inside irb, enter "require 'irb/completion' "
I seem to recollect something similar working for me on Windows some time ago.

HTH
CT
 
H

Hee-Seng Kye

Have you tried starting irb as "irb --readline" ?
Or, inside irb, enter "require 'irb/completion' "
I seem to recollect something similar working for me on Windows some time ago.

HTH
CT

Thanks for replying!!! Yes, I've tried both methods, and still with no
luck. It's not big a deal but still frustrating.

Anyone in this list working on Mac OS x and having a similar problem? I've
tried everything I can, but it's not going anywhere...
 
D

Dick Davies

* Hee-Seng Kye said:
Thanks for replying!!! Yes, I've tried both methods, and still with no
luck. It's not big a deal but still frustrating.

Anyone in this list working on Mac OS x and having a similar problem? I've
tried everything I can, but it's not going anywhere...

I had this trouble on netbsd2.
Did you build the ruby readline extension when you built the source?

(does

ruby -rreadline -e '1'

give an error?)

If so you might need to go into

ext/readline

under your ruby source directory and try :

ruby extconf.rb
make/make install
 
H

Hee-Seng Kye

If so you might need to go into
ext/readline

under your ruby source directory and try :

ruby extconf.rb
make/make install

Thank you so much!!! That's *exactly* what I wanted to know!!! It's
working perfectly now!!! Thanks X 100000!!!!!
 
H

Hee-Seng Kye

I had this trouble on netbsd2.
Did you build the ruby readline extension when you built the source?

Hi Dick,

I had one more question. If I build Ruby from the source, which I did, do I
always need to build extensions in the 'ext' folder separately? Is there a
way to have everything in the 'ext' folder built when I build Ruby in the
first place?

Thanks again for getting me out of this pure frustration!!!
 
D

Dick Davies

* Hee-Seng Kye said:
Hi Dick,

I had one more question. If I build Ruby from the source, which I did, do I
always need to build extensions in the 'ext' folder separately? Is there a
way to have everything in the 'ext' folder built when I build Ruby in the
first place?

I don't think so, just for some reason the readline extension did'nt find
your readline lib when you last built it.

on netbsd it's because I I have readline in /usr/pkg and I suspect the
ruby build does'nt look there...
 
R

Ralf Müller

Hi Dick,

I had one more question. If I build Ruby from the source, which I did, do I
always need to build extensions in the 'ext' folder separately? Is there a
way to have everything in the 'ext' folder built when I build Ruby in the
first place?

Thanks again for getting me out of this pure frustration!!!

there is a file 'ext/Setup' in which you can choose your favorite extension (readline,win32,...)


regards
ralf
 
H

Hee-Seng Kye

Thanks Dick and Ralf! It's all very clear now! It was my first time
compiling a language, so I was much confused... Thanks!
 

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
474,166
Messages
2,570,907
Members
47,448
Latest member
DeanaQ4445

Latest Threads

Top