I just installed ruby 1.9.2 on windows machine and Backspace or any other arrow keys don't work. This happens only when I open IRB on Git Bash console. But it works fine on Windows console. Any help on that?
我刚刚在Windows机器上安装了ruby 1.9.2,Backspace或任何其他箭头键都不起作用。只有在Git Bash控制台上打开IRB时才会发生这种情况。但它在Windows控制台上运行良好。对此有何帮助?
Note: IRB was working fine on both consoles with the earlier versions of ruby.
注意:IRB在早期版本的ruby的两个控制台上运行良好。
5 个解决方案
#1
46
Same thing happened to me. Running irb with --noreadline solved my problem:
同样的事情发生在我身上。使用--noreadline运行irb解决了我的问题:
irb --noreadline
#2
7
You can also disable readline in ~/.irbrc
您还可以在〜/ .irbrc中禁用readline
IRB.conf[:USE_READLINE] = false
#3
6
Seems you didn't have readline installed while compile ruby. So install readline, maybe also readline-devel, then recompile ruby.
似乎你在编译ruby时没有安装readline。所以安装readline,也许readline-devel,然后重新编译ruby。
#4
5
Install the rb-readline gem.
安装rb-readline gem。
gem install rb-readline
#5
3
As documented here https://groups.google.com/forum/#!topic/rubyinstaller/HgswOz1T-eE, use the below command/alias:
如此处所述https://groups.google.com/forum/#!topic/rubyinstaller/HgswOz1T-eE,请使用以下命令/别名:
alias irb="ruby -S irb"
If that doesn't work, use pry instead:
如果这不起作用,请使用pry代替:
gem install pry
#1
46
Same thing happened to me. Running irb with --noreadline solved my problem:
同样的事情发生在我身上。使用--noreadline运行irb解决了我的问题:
irb --noreadline
#2
7
You can also disable readline in ~/.irbrc
您还可以在〜/ .irbrc中禁用readline
IRB.conf[:USE_READLINE] = false
#3
6
Seems you didn't have readline installed while compile ruby. So install readline, maybe also readline-devel, then recompile ruby.
似乎你在编译ruby时没有安装readline。所以安装readline,也许readline-devel,然后重新编译ruby。
#4
5
Install the rb-readline gem.
安装rb-readline gem。
gem install rb-readline
#5
3
As documented here https://groups.google.com/forum/#!topic/rubyinstaller/HgswOz1T-eE, use the below command/alias:
如此处所述https://groups.google.com/forum/#!topic/rubyinstaller/HgswOz1T-eE,请使用以下命令/别名:
alias irb="ruby -S irb"
If that doesn't work, use pry instead:
如果这不起作用,请使用pry代替:
gem install pry