3

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?

4 Answers 4

4

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
0
1

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

2
  • win xp ... if your theory is correct, does it make sense that it would work for 'rails console' but not for 'irb'?
    – jpw
    Jun 23, 2011 at 1:27
  • I appreciate your attempt to help!
    – jpw
    Jun 25, 2011 at 19:29
1

Doing the following command fixed the problem for me on Windows

gem install wirble win32console
1
  • thx! (tho I moved to a mac after one window problem after another)
    – jpw
    Apr 23, 2012 at 21:25
1

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

alias irb="ruby -S irb"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.