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

**URL:** <https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401>\
**Category:** ruby-talk\
**Created:** [11 February 2005 10:30 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401 "2005-02-11T10:30:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paulo\_Pinto](https://avatars.discourse-cdn.com/v4/letter/p/7cd45c/32.png) [@Paulo\_Pinto](https://rubytalk.org/u/Paulo_Pinto)\
**Post date:** [11 February 2005 10:30 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401/1 "2005-02-11T10:30:19Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Piergiuliano\_Bossi](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@Piergiuliano\_Bossi](https://rubytalk.org/u/Piergiuliano_Bossi)\
**Post date:** [11 February 2005 10:40 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401/2 "2005-02-11T10:40:04Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Its\_Me](https://avatars.discourse-cdn.com/v4/letter/i/958977/32.png) [@Its\_Me](https://rubytalk.org/u/Its_Me)\
**Post date:** [11 February 2005 14:00 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401/3 "2005-02-11T14:00:03Z")

</div>

"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:  
&nbsp;&nbsp;&nbsp;&nbsp;irb\<ret\>  
&nbsp;&nbsp;&nbsp;&nbsp;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\*

---

<div class="post-metadata">

**Author:** ![Ochronus](https://avatars.discourse-cdn.com/v4/letter/o/8491ac/32.png) [@Ochronus](https://rubytalk.org/u/Ochronus)\
**Post date:** [11 February 2005 23:48 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401/4 "2005-02-11T23:48:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Paulo\_Pinto](https://avatars.discourse-cdn.com/v4/letter/p/7cd45c/32.png) [@Paulo\_Pinto](https://rubytalk.org/u/Paulo_Pinto)\
**Post date:** [11 February 2005 13:35 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401/5 "2005-02-11T13:35:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Paulo\_Pinto](https://avatars.discourse-cdn.com/v4/letter/p/7cd45c/32.png) [@Paulo\_Pinto](https://rubytalk.org/u/Paulo_Pinto)\
**Post date:** [11 February 2005 16:00 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401/6 "2005-02-11T16:00:19Z")

</div>

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:  
> > &nbsp;&nbsp;&nbsp;&nbsp;irb\<ret\>  
> > &nbsp;&nbsp;&nbsp;&nbsp;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\*

---

<div class="post-metadata">

**Author:** ![Austin\_Ziegler5](https://yyz1.discourse-cdn.com/flex029/user_avatar/rubytalk.org/austin_ziegler5/32/1985_2.png) [@Austin\_Ziegler5](https://rubytalk.org/u/Austin_Ziegler5)\
**Post date:** [11 February 2005 16:26 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401/7 "2005-02-11T16:26:48Z")

</div>

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

> **···**
>
> 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!
> 
> --  
> Austin Ziegler \* halostatue@gmail.com  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\* Alternate: austin@halostatue.ca

---

<div class="post-metadata">

**Author:** ![linus\_sellberg2](https://avatars.discourse-cdn.com/v4/letter/l/839c29/32.png) [@linus\_sellberg2](https://rubytalk.org/u/linus_sellberg2)\
**Post date:** [13 February 2005 01:34 UTC](https://rubytalk.org/t/help-irb-doesnt-work-in-windows-xp/16401/8 "2005-02-13T01:34:59Z")

</div>

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.
