Irb problems on one-click windows installer

Hi,

I have a couple of students that use Ruby in a course and they've run into a problem that is not my home ground since I don't run Ruby from the one-click installer. But maybe some of you have seen this problem:

After installing the latest one-click installer irb works from the standard windows command line prompt (cmd) but they say they cannot use curly {} or normal braces [] so cannot try out code easily.

Can this be a problem with the one-click installer irb or is it their windows setup?

Any hints appreciated.

I've been trying to get them to install cygwin and run from their but they are stubborn... :wink:

Thanks,

Robert

Robert Feldt wrote:

Hi,

I have a couple of students that use Ruby in a course and they've run
into a problem that is not my home ground since I don't run Ruby from
the one-click installer. But maybe some of you have seen this problem:

After installing the latest one-click installer irb works from the
standard windows command line prompt (cmd) but they say they cannot use
curly {} or normal braces so cannot try out code easily.

Can this be a problem with the one-click installer irb or is it their
windows setup?

Any hints appreciated.

I've been trying to get them to install cygwin and run from their but
they are stubborn... :wink:

Are you using a non-english keyboard? If so, I know there are issues here
(which is beyond my expertise), but I have seen solutions posted to
ruby-talk. Try this google search (for example):

   site:blade.nagaokaut.aazc.jp ruby irb german keyboard

Curt

Robert Feldt wrote:

Hi,

I have a couple of students that use Ruby in a course and they've run into a problem that is not my home ground since I don't run Ruby from the one-click installer. But maybe some of you have seen this problem:

After installing the latest one-click installer irb works from the standard windows command line prompt (cmd) but they say they cannot use curly {} or normal braces so cannot try out code easily.

Can this be a problem with the one-click installer irb or is it their windows setup?

That was discussed here http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/107700
and there http://poignantguide.net/ruby/expansion-pak-1.html
(the latter being the funnier link, thanks to why_).

Do they also have problems with '\', '|', '@' and '~'. In that case they might try to create '.inputrc' in their home directories and put the following lines into that file

"\M-[": "["
"\M-]": "]"
"\M-{": "{"
"\M-}": "}"
"\M-\\": "\\"
"\M-|": "|"
"\M-@": "@"
"\M-~": "~"

They might need to patch some of the settings, depending on the keyboard layout. The above lines fit my German keyboard layout. In Sweden YMMV.

Any hints appreciated.

I've been trying to get them to install cygwin and run from their but they are stubborn... :wink:

They might try Linux... :wink:

Stephan

Robert Feldt wrote:

I have a couple of students that use Ruby in a course and they've run into a problem that is not my home ground since I don't run Ruby from the one-click installer. But maybe some of you have seen this problem:

After installing the latest one-click installer irb works from the standard windows command line prompt (cmd) but they say they cannot use curly {} or normal braces so cannot try out code easily.

Another problem is that Ctrl-Left/Right don't do word-wise cursor movement. I know of no good way of fixing this (the issue seems to be readline not receiving the Ctrl-flag for cursor keys), but Alt-Left/Right can be mapped:

"\M-\e[D": backward-word
"\M-\e[C": forward-word

If anybody knows of a way to get Ctrl-Left/Right to work with cmd (I know it works with rxvt, but that usually isn't an option) I'd really like to know about it.

And irb doesn't even do anything when run with the --no-readline option for me. This is IMHO a big problem because readline support is only really needed when you want to use tab-completion anyway. (And I'm not even sure if tab-completion is worth it -- last time I checked it wasn't even intelligent about only listing methods that the object actually responds to...)

So I'd suggest that the --no-readline option of irb should disable readline support and that the one click installer should include a default .inputrc.

Curt Hibbs wrote:

Robert Feldt wrote:

Hi,

I have a couple of students that use Ruby in a course and they've run
into a problem that is not my home ground since I don't run Ruby from
the one-click installer. But maybe some of you have seen this problem:

After installing the latest one-click installer irb works from the
standard windows command line prompt (cmd) but they say they cannot use
curly {} or normal braces so cannot try out code easily.

Can this be a problem with the one-click installer irb or is it their
windows setup?

Any hints appreciated.

I've been trying to get them to install cygwin and run from their but
they are stubborn... :wink:

Are you using a non-english keyboard? If so, I know there are issues here
(which is beyond my expertise), but I have seen solutions posted to
ruby-talk. Try this google search (for example):

   site:blade.nagaokaut.aazc.jp ruby irb german keyboard

Curt

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/107774

Florian Gross ha scritto:

So I'd suggest that the --no-readline option of irb should disable readline support and that the one click installer should include a default .inputrc.

I strongly agree, FWIW.
Also, while we're at it: why irb does not use optaparse?
I'm getting byte every time I do something like
irb -roptparse (note the missing space beetween -r and the argument)

Henrik Horneber wrote:

Curt Hibbs wrote:

Robert Feldt wrote:

Hi,

I have a couple of students that use Ruby in a course and they've run
into a problem that is not my home ground since I don't run Ruby from
the one-click installer. But maybe some of you have seen this problem:

After installing the latest one-click installer irb works from the
standard windows command line prompt (cmd) but they say they cannot use
curly {} or normal braces so cannot try out code easily.

Can this be a problem with the one-click installer irb or is it their
windows setup?

Any hints appreciated.

I've been trying to get them to install cygwin and run from their but
they are stubborn... :wink:

Are you using a non-english keyboard? If so, I know there are issues here
(which is beyond my expertise), but I have seen solutions posted to
ruby-talk. Try this google search (for example):

   site:blade.nagaokaut.aazc.jp ruby irb german keyboard

Curt

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/107774

Thanks to both of you.

Yes, they are on non-US keyboards.

Sorry I missed the posts. I will look around but the students are not on mingw32 so I'm not sure there is an inputrc on plain windows. Maybe it can help them find a solution though. If anyone already has found it please share.

Thanks,

Robert

gabriele renzi wrote:

Florian Gross ha scritto:

> So I'd suggest that the --no-readline option of irb should disable
> readline support and that the one click installer should include a
> default .inputrc.

I strongly agree, FWIW.

I'm adding this to my to-do list.

Curt

Robert Feldt wrote:

Henrik Horneber wrote:

Curt Hibbs wrote:

Robert Feldt wrote:

Hi,

I have a couple of students that use Ruby in a course and they've run
into a problem that is not my home ground since I don't run Ruby from
the one-click installer. But maybe some of you have seen this problem:

After installing the latest one-click installer irb works from the
standard windows command line prompt (cmd) but they say they cannot use
curly {} or normal braces so cannot try out code easily.

Can this be a problem with the one-click installer irb or is it their
windows setup?

Any hints appreciated.

I've been trying to get them to install cygwin and run from their but
they are stubborn... :wink:

Are you using a non-english keyboard? If so, I know there are issues here
(which is beyond my expertise), but I have seen solutions posted to
ruby-talk. Try this google search (for example):

   site:blade.nagaokaut.aazc.jp ruby irb german keyboard

Curt

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/107774

Thanks to both of you.

Yes, they are on non-US keyboards.

Sorry I missed the posts. I will look around but the students are not on mingw32 so I'm not sure there is an inputrc on plain windows.

If they are using the latest One-Click-Installer, the instructions given by eban work. At least for me.

regards,
Henrik

Henrik Horneber ha scritto:

Robert Feldt wrote:

Henrik Horneber wrote:

Curt Hibbs wrote:

Robert Feldt wrote:

Hi,

I have a couple of students that use Ruby in a course and they've run
into a problem that is not my home ground since I don't run Ruby from
the one-click installer. But maybe some of you have seen this problem:

After installing the latest one-click installer irb works from the
standard windows command line prompt (cmd) but they say they cannot use
curly {} or normal braces so cannot try out code easily.

Can this be a problem with the one-click installer irb or is it their
windows setup?

Any hints appreciated.

I've been trying to get them to install cygwin and run from their but
they are stubborn... :wink:

Are you using a non-english keyboard? If so, I know there are issues here
(which is beyond my expertise), but I have seen solutions posted to
ruby-talk. Try this google search (for example):

   site:blade.nagaokaut.aazc.jp ruby irb german keyboard

Curt

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/107774

Thanks to both of you.

Yes, they are on non-US keyboards.

Sorry I missed the posts. I will look around but the students are not on mingw32 so I'm not sure there is an inputrc on plain windows.

If they are using the latest One-Click-Installer, the instructions given by eban work. At least for me.

agreed, they work for me, even if from time to time I end up typing some strange character and irb crahes :confused:

PS
my inpoutrc is
"\M-[": "["
"\M-]": "]"
"\M-{": "{"
"\M-}": "}"
"\M-\\": "\\"
"\M-|": "|"
"\M-@": "@"
"\M-": ""
"\M-\3760": "}"
"\M-\3767": "{"
"\M-\3768": "("
"\M-\3769": ")"
"\M-\e[3~": delete-char

but 'del' never really worked for me :frowning: