On Dec 2, 5:39 pm, Luis Lavena <
luislav...@gmail.com> wrote:
> On Thu, Dec 2, 2010 at 6:53 PM, Chris Perkins <
chrisperkin...@gmail.com> wrote:
> > Maybe it's just me, but irb doesn't seem to be very usable with
> > rubyinstaller-1.8.7-p302.exe. The main problem is that I cannot
> > backspace - if I do, I just get some weird control characters on the
> > command line - it looks like a little arrow, then a square bracket and
> > a capital D.
>
> > Is this normal? Or is there something wrong with my system that I can
> > fix?
>
> > This is with the normal windows cmd window, on XP.
>
> IRB does works on Windows :-)
>
> All the latest releases of RubyInstaller included a pure-ruby version
> of readline (rb-readline):
>
>
http://github.com/luislavena/rb-readline
>
> And IRB uses that version of readline.
>
> I have a few questions for you:
>
> * What codepage are you working on? (chcp)
C:\chris>chcp
Active code page: 437
> * What font is your command prompt using (raster or TrueType)
TrueType
> * Do you have any .inputrc file located in your home directory? If so,
> please show the contents
Yes, I do. I have never heard of it, and have no idea how it got
there, but here is what it contains:
set blink-matching-paren on
> * Do you have any .irbrc located in your home directory? If so, please
> show the contents
No.
> * Specifically, what version of Windows are you running? 32 or 64bits,
> what language, etc.
32 bit XP.
>
> Thank you.
> --
> Luis Lavena
I should have given more details - here is what I actually get when I
urn irb:
C:\chris>irb
stty: Unknown mode: g
stty: Unknown mode: icrnl
irb(main):001:0> quit
Usage: stty [-a|-all|everything]
stty [[-]sane|hide|line|echo|iproc|winput|minput|oproc|owrap]
[rows [#][,[#]]] [columns [#][,[#]]] ([icp #] [ocp #]|[cp
#]) [ pos [#][,[#]]] [erase c]
C:\chris>which stty
C:/PROGRA~1/MKSTOO~1/mksnt/stty.exe
This made me suspect some bad interaction with MKS Toolkit (a
commercial package providing unix tools for windows). So I try in a
shell that has my PATH adusted to remove the MKS stuff, and I get this
instead:
C:\chris>irb
C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:1796:in ``': No such
file or directory - infocmp -C (Errno::EN
OENT)
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:1796:in
`get_term_capabilities'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:2005:in
`_rl_init_terminal_io'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:2491:in
`readline_initialize_everything'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:3726:in
`rl_initialize'
from C:/Ruby187/lib/ruby/site_ruby/1.8/rbreadline.rb:4720:in
`readline'
from C:/Ruby187/lib/ruby/site_ruby/1.8/readline.rb:40:in
`readline'
from C:/Ruby187/lib/ruby/1.8/irb/input-method.rb:97:in `gets'
from C:/Ruby187/lib/ruby/1.8/irb.rb:140:in `eval_input'
from C:/Ruby187/lib/ruby/1.8/irb.rb:271:in `signal_status'
from C:/Ruby187/lib/ruby/1.8/irb.rb:139:in `eval_input'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:189:in `call'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:189:in
`buf_input'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:104:in `getc'
from C:/Ruby187/lib/ruby/1.8/irb/slex.rb:206:in `match_io'
from C:/Ruby187/lib/ruby/1.8/irb/slex.rb:76:in `match'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:287:in `token'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:263:in `lex'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:234:in
`each_top_level_statement'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:230:in `loop'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:230:in
`each_top_level_statement'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:229:in `catch'
from C:/Ruby187/lib/ruby/1.8/irb/ruby-lex.rb:229:in
`each_top_level_statement'
from C:/Ruby187/lib/ruby/1.8/irb.rb:154:in `eval_input'
from C:/Ruby187/lib/ruby/1.8/irb.rb:71:in `start'
from C:/Ruby187/lib/ruby/1.8/irb.rb:70:in `catch'
from C:/Ruby187/lib/ruby/1.8/irb.rb:70:in `start'
from C:/Ruby187/bin/irb:13
I don't know what infocmp is, but the first google hit is for
mkssoftware.com - very suspicious.
Any ideas what I should do? I'm guessing I should re-run the
installer in an environment that does not have the MKS tools in the
path. I'll let you know whether that helps.
Thank you,
Chris Perkins