[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Readline doesn't work no matter what I do

Hee-Seng Kye

2/6/2005 11:08:00 PM

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.




8 Answers

Shajith

2/7/2005 8:00:00 AM

0

On Mon, 7 Feb 2005 08:07:47 +0900, Hee-Seng Kye <katsura@msbx.net> wrote:
> 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


Hee-Seng Kye

2/7/2005 9:36:00 AM

0

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




Dick Davies

2/7/2005 10:17:00 AM

0

* Hee-Seng Kye <katsura@msbx.net> [0236 09:36]:
> > 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...

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


--
'Oh. Your. God.'
-- Bender
Rasputin :: Jack of All Trades - Master of Nuns


Hee-Seng Kye

2/7/2005 10:59:00 AM

0

> 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!!!!!




Hee-Seng Kye

2/7/2005 11:31:00 AM

0

> 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!!!




Dick Davies

2/7/2005 11:38:00 AM

0

* Hee-Seng Kye <katsura@msbx.net> [0231 11:31]:
> > 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?

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

--
'Interesting. No, wait, the other thing - Tedious.'
-- Bender
Rasputin :: Jack of All Trades - Master of Nuns


Ralf Müller

2/7/2005 11:44:00 AM

0

On Mon, 7 Feb 2005 20:31:01 +0900
Hee-Seng Kye <katsura@msbx.net> wrote:

> > 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!!!
>

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


regards
ralf


Hee-Seng Kye

2/7/2005 12:33:00 PM

0

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