Vin*_*han 33 ruby irb git-bash
我刚刚在Windows机器上安装了ruby 1.9.2,Backspace或任何其他箭头键都不起作用.只有当我在Git Bash控制台上打开IRB时才会发生这种情况.但它在Windows控制台上运行良好.对此有何帮助?
注意:IRB在早期版本的ruby的两个控制台上运行良好.
Nen*_*hev 48
同样的事情发生在我身上.使用--noreadline运行irb 解决了我的问题:
irb --noreadline
Run Code Online (Sandbox Code Playgroud)
似乎你在编译ruby时没有安装readline.所以安装readline,也许readline-devel,然后重新编译ruby.
如此处https://groups.google.com/forum/#!topic/rubyinstaller/HgswOz1T-eE所述,请使用以下命令/别名:
alias irb="ruby -S irb"
Run Code Online (Sandbox Code Playgroud)
如果这不起作用,请改用pry:
gem install pry
Run Code Online (Sandbox Code Playgroud)