ruby irb on windows using gitbash shell - can'

2019-07-04 12:01发布

when I do rails console my git bash shell permits me to use up arrow to recall commands, and use left/right arrows to modify the text I'm entering

when I run irb the shell ignores backspace and arrow keys

I'm not sure why the arrow keys would work fine in the shell for rails console but not when running irb?

标签: ruby shell irb
4条回答
姐就是有狂的资本
2楼-- · 2019-07-04 12:05

As documented here https://groups.google.com/forum/#!topic/rubyinstaller/HgswOz1T-eE, use the below command/alias:

alias irb="ruby -S irb"
查看更多
兄弟一词,经得起流年.
3楼-- · 2019-07-04 12:13

As I just wrote in the related Backspace and arrow keys aren't working in IRB(Git Bash console) on windows machine:

running irb with --noreadline solved this problem for me:

irb --noreadline
查看更多
beautiful°
4楼-- · 2019-07-04 12:15

Doing the following command fixed the problem for me on Windows

gem install wirble win32console
查看更多
爱情/是我丢掉的垃圾
5楼-- · 2019-07-04 12:27

What operating system are you running? You may need install the GNU Readline Library and reinstall ruby.

查看更多
登录 后发表回答