HELP! irb doesn't work in Windows XP :(

P

Paulo Pinto

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
 
P

Piergiuliano Bossi

Paulo said:
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
 
P

Paulo Pinto

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 said:
Paulo said:
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
 
P

Paulo Pinto

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

Austin Ziegler

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
 
O

Ochronus

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
 
L

linus sellberg

Paulo said:
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.
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top