[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

HELP! irb doesn't work in Windows XP :

Paulo Pinto

2/11/2005 10:30:00 AM

Hi everyone,

I started playing with Ruby after the famous
onlamp article about rails.

Now I have a problem with irb, it just doesn't
work. :(

Let me explain, I've installed Ruby in a Windows XP
Home Edition(french). my laptop uses the swiss-french
keyboard layout. And all programs are able to read
the keyboard without problems except irb!

If run in the console, it isn't able to read AltGr+key
combinations, that i need for {}[] among others. If
I run it inside the Scitilla editor, every key is processed
twice. So a becomes aa, b becomes bb and so forth.

Any ideas?

Thanks in advance,
Paulo


7 Answers

Piergiuliano Bossi

2/11/2005 10:38:00 AM

0

Paulo Pinto wrote:
> Let me explain, I've installed Ruby in a Windows XP
> Home Edition(french). my laptop uses the swiss-french
> keyboard layout. And all programs are able to read
> the keyboard without problems except irb!
>
> If run in the console, it isn't able to read AltGr+key
> combinations, that i need for {}[] among others. If
> I run it inside the Scitilla editor, every key is processed
> twice. So a becomes aa, b becomes bb and so forth.

I don't know about Scintilla, but I have managed to let irb work on my
Dell laptop (Inspiron 2500) with an Italian-layout keyboard, Win2K Pro
SP4 (in English) just setting appropriate values in my .inputrc (kept in
win equivalent of ~, that is C:\Documents and Settings\bop in my case):
"\M-[": "["
"\M-]": "]"
"\M-{": "{"
"\M-}": "}"
"\M-\\": "~"
"\M-|": "|"
"\M-@": "@"
"\M-": ""
"\M-~": "~"
"\M-\3760": "}"
"\M-\3767": "{"
"\M-\3768": "("
"\M-\3769": ")"
"\M-\e[3~": delete-char

I have not managed to let ~ work with Fn+126, therefore as you can see I
artifically map it with Alt+
You may find some more references in the archive as well, please check it.

Please note that you have to specificy an environment variable like the
following in order to make it work:
INPUTRC=C:\Documents and Settings\bop\.inputrc

HTH
Giuliano

--
If you want to send me an email address should be 'p', then a dot,
followed by 'bossi' at 'quinary', another dot and 'com' at last

Paulo Pinto

2/11/2005 1:25:00 PM

0

Thanks for the information.
It's already good enough to keep going.

<rant>
But this beares the question. WHY ON EARTH does
a nice language like ruby has this problems to start with?

It seems that it's using some processing of scancodes
instead of doing the right thing and read the windows
character codes. This is the first time I have such a
problem in Windows. And on Unix I only get this
type of problems in misconfigured terminals.

I almost feel like going to the comfortable PythonWin
IDE!
</rant>

Now that I've thrown that out of my chest, I will try
to play around with ruby in Linux. Maybe there I
will have better luck.

Thanks for the help,
Paulo

"Piergiuliano Bossi" <p_bossi_AGAINST_SPAM@tiscali.it> wrote in message
news:420c8afa$0$32339$5fc30a8@news.tiscali.it...
> Paulo Pinto wrote:
> > Let me explain, I've installed Ruby in a Windows XP
> > Home Edition(french). my laptop uses the swiss-french
> > keyboard layout. And all programs are able to read
> > the keyboard without problems except irb!
> >
> > If run in the console, it isn't able to read AltGr+key
> > combinations, that i need for {}[] among others. If
> > I run it inside the Scitilla editor, every key is processed
> > twice. So a becomes aa, b becomes bb and so forth.
>
> I don't know about Scintilla, but I have managed to let irb work on my
> Dell laptop (Inspiron 2500) with an Italian-layout keyboard, Win2K Pro
> SP4 (in English) just setting appropriate values in my .inputrc (kept in
> win equivalent of ~, that is C:\Documents and Settings\bop in my case):
> "\M-[": "["
> "\M-]": "]"
> "\M-{": "{"
> "\M-}": "}"
> "\M-\\": "~"
> "\M-|": "|"
> "\M-@": "@"
> "\M-": ""
> "\M-~": "~"
> "\M-\3760": "}"
> "\M-\3767": "{"
> "\M-\3768": "("
> "\M-\3769": ")"
> "\M-\e[3~": delete-char
>
> I have not managed to let ~ work with Fn+126, therefore as you can see I
> artifically map it with Alt+>
> You may find some more references in the archive as well, please check it.
>
> Please note that you have to specificy an environment variable like the
> following in order to make it work:
> INPUTRC=C:\Documents and Settings\bop\.inputrc
>
> HTH
> Giuliano
>
> --
> If you want to send me an email address should be 'p', then a dot,
> followed by 'bossi' at 'quinary', another dot and 'com' at last
>


Its Me

2/11/2005 1:57:00 PM

0


"Paulo Pinto" <pjmlp@progtools.org> wrote in message

> Let me explain, I've installed Ruby in a Windows XP
> Home Edition(french). my laptop uses the swiss-french
> keyboard layout. And all programs are able to read
> the keyboard without problems except irb!

I wonder if this is related to the problems with using IRB from within
jEdit's console shell, also on XP. Again it seems to be double-reading many
keystrokes. And this is with a straight US keyboard. I assumed it was a
jEdit bug but not I'm not so sure.

Here is what it looks like. All I typed is:
irb<ret>
2+2<ret>
Note that the 2+2 is echoed back again, and the second <ret> seems to be
read twice as IRB is now in line-continuation mode. Any pointers
appreciated, as I have basically given up on using irb within jEdit's
console.

C:\Program Files\jEdit 4.2> irb
irb(main):001:0> 2 + 2
2 + 2
=> 4
irb(main):002:0>
irb(main):003:0*


Paulo Pinto

2/11/2005 4:01:00 PM

0

I guess that the fact that you are able to use it
in the command prompt with a US keyboard
might say something about it.

What I find strange is that since ruby is already
10 years old, how this problems still exist with
the tools that ship with the language.

I like the language, specially the Smalltalk way
of doing things in it. However just imagine
trying to convince your coworkers to use
the language and explain at the same time
why irb doesn't work!
--
Paulo

"itsme213" <itsme213@hotmail.com> wrote in message
news:rQ2Pd.39328$sr1.35699@fe2.texas.rr.com...
>
> "Paulo Pinto" <pjmlp@progtools.org> wrote in message
>
> > Let me explain, I've installed Ruby in a Windows XP
> > Home Edition(french). my laptop uses the swiss-french
> > keyboard layout. And all programs are able to read
> > the keyboard without problems except irb!
>
> I wonder if this is related to the problems with using IRB from within
> jEdit's console shell, also on XP. Again it seems to be double-reading
many
> keystrokes. And this is with a straight US keyboard. I assumed it was a
> jEdit bug but not I'm not so sure.
>
> Here is what it looks like. All I typed is:
> irb<ret>
> 2+2<ret>
> Note that the 2+2 is echoed back again, and the second <ret> seems to be
> read twice as IRB is now in line-continuation mode. Any pointers
> appreciated, as I have basically given up on using irb within jEdit's
> console.
>
> C:\Program Files\jEdit 4.2> irb
> irb(main):001:0> 2 + 2
> 2 + 2
> => 4
> irb(main):002:0>
> irb(main):003:0*
>
>


Austin Ziegler

2/11/2005 4:27:00 PM

0

On Sat, 12 Feb 2005 01:00:19 +0900, Paulo Pinto <pjmlp@progtools.org> wrote:
> I guess that the fact that you are able to use it
> in the command prompt with a US keyboard
> might say something about it.
>
> What I find strange is that since ruby is already
> 10 years old, how this problems still exist with
> the tools that ship with the language.
>
> I like the language, specially the Smalltalk way
> of doing things in it. However just imagine
> trying to convince your coworkers to use
> the language and explain at the same time
> why irb doesn't work!

The real problem here is that the Windows package is not put together
well for international users and more feedback is required to make
things work better. You shouldn't have to find these workarounds; they
should already be present.

Curt, might it be possible to modify the installer so that either (1)
the readline code can be turned off for some users or (2) improve the
readline code for international users and provide a checkbox or
drop-down for this?

-austin
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca


Ochronus

2/11/2005 11:48:00 PM

0

Hi everyone,

First I'd like to say hello to all the list members :) It's my first
post, though I've been reading the list much.

I just installed Pimki by using gem, and it works wonderfully (a very
nice and promising piece of work, indeed!). I have one small problem
though: when I stop and restart the webrick daemon (by pimki.rb), the
web system renders useless with this error:

Internal Server Error
Undefined method
WEBrick/1.3.1 (Ruby/1.8.2/2004-12-25) at mywebserver:2500

I have the (madeleine) snapshot in place, I've tried specifying the
storage path (but it gets it right by default, I do not change dir
after stopping and before starting the pimki.rb webrick wrapper).

If I delete the storage, it starts offering to create a new site, as
if run with a virgin install.

Instiki, on the other hand, works well with the same process: I start
instiki, create a site, edit it some, kill the instiki process,
restart instiki, and the site is there unchanged.

What am I missing/doing wrong? Do you have any idea?

Thanks in advance and for the patience anyway :)

Ochronus



linus sellberg

2/13/2005 1:33:00 AM

0

Paulo Pinto wrote:
> What I find strange is that since ruby is already
> 10 years old, how this problems still exist with
> the tools that ship with the language.


Still? It worked fine before 1.8.2 prerelease 3 or something like that.