Backspace and arrow keys aren't working in IRB(Git Bash console) on windows machine

12,657

Solution 1

Same thing happened to me. Running irb with --noreadline solved my problem:

irb --noreadline

Solution 2

Seems you didn't have readline installed while compile ruby. So install readline, maybe also readline-devel, then recompile ruby.

Solution 3

You can also disable readline in ~/.irbrc

IRB.conf[:USE_READLINE] = false

Solution 4

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

alias irb="ruby -S irb"

If that doesn't work, use pry instead:

gem install pry

Solution 5

Install the rb-readline gem.

gem install rb-readline
Share:
12,657
Vineeth Pradhan
Author by

Vineeth Pradhan

Current: javascript, jQuery, node.js, mongodb, HTML5, bootstrap Past: Ruby, Ruby on Rails, MySQL

Updated on June 07, 2022

Comments

  • Vineeth Pradhan
    Vineeth Pradhan almost 2 years

    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?

    Note: IRB was working fine on both consoles with the earlier versions of ruby.