Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > HELP! irb doesn't work in Windows XP :(

Reply
Thread Tools

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

 
 
Paulo Pinto
Guest
Posts: n/a
 
      02-11-2005
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


 
Reply With Quote
 
 
 
 
Piergiuliano Bossi
Guest
Posts: n/a
 
      02-11-2005
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

 
Reply With Quote
 
 
 
 
Paulo Pinto
Guest
Posts: n/a
 
      02-11-2005
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" <(E-Mail Removed)> wrote in message
news:420c8afa$0$32339$(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
Paulo Pinto
Guest
Posts: n/a
 
      02-11-2005
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" <(E-Mail Removed)> wrote in message
news:rQ2Pd.39328$(E-Mail Removed)...
>
> "Paulo Pinto" <(E-Mail Removed)> 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*
>
>



 
Reply With Quote
 
Austin Ziegler
Guest
Posts: n/a
 
      02-11-2005
On Sat, 12 Feb 2005 01:00:19 +0900, Paulo Pinto <(E-Mail Removed)> 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 * http://www.velocityreviews.com/forums/(E-Mail Removed)
* Alternate: (E-Mail Removed)


 
Reply With Quote
 
Ochronus
Guest
Posts: n/a
 
      02-11-2005
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



 
Reply With Quote
 
linus sellberg
Guest
Posts: n/a
 
      02-13-2005
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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
irb require ... where does irb look? what path? anne001 Ruby 1 06-27-2006 12:07 PM
How to make readline work in IRB? Randy Kramer Ruby 5 03-23-2006 03:43 PM
Suse 10 irb navigation keys does not work lalerijo none Ruby 1 12-27-2005 11:57 AM
irb question - variable definitions when calling irb from a script problem Nuralanur@aol.com Ruby 1 10-26-2005 09:13 PM
[ANN] irb-history 1.0.0: Persistent, shared Readline history for IRB Sam Stephenson Ruby 1 06-18-2005 08:56 AM



Advertisments