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

Discussion in 'Ruby' started by Paulo Pinto, Feb 11, 2005.

  1. Paulo Pinto

    Paulo Pinto Guest

    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
     
    Paulo Pinto, Feb 11, 2005
    #1
    1. Advertising

  2. 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
     
    Piergiuliano Bossi, Feb 11, 2005
    #2
    1. Advertising

  3. Paulo Pinto

    Paulo Pinto Guest

    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" <> wrote in message
    news:420c8afa$0$32339$...
    > 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, Feb 11, 2005
    #3
  4. Paulo Pinto

    Paulo Pinto Guest

    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" <> wrote in message
    news:rQ2Pd.39328$...
    >
    > "Paulo Pinto" <> 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, Feb 11, 2005
    #4
  5. On Sat, 12 Feb 2005 01:00:19 +0900, Paulo Pinto <> 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 *
    * Alternate:
     
    Austin Ziegler, Feb 11, 2005
    #5
  6. Paulo Pinto

    Ochronus Guest

    Pimki question

    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
     
    Ochronus, Feb 11, 2005
    #6
  7. 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.
     
    linus sellberg, Feb 13, 2005
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MZ
    Replies:
    7
    Views:
    877
    Ed Mullen
    Mar 17, 2008
  2. Tilman
    Replies:
    0
    Views:
    441
    Tilman
    Mar 19, 2008
  3. Sam Stephenson
    Replies:
    1
    Views:
    265
    Andrew Walrond
    Jun 18, 2005
  4. Replies:
    1
    Views:
    179
    Florian GroƟ
    Oct 26, 2005
  5. anne001
    Replies:
    1
    Views:
    310
    anne001
    Jun 27, 2006
Loading...

Share This Page