Thursday 24 July 2014

Using rlwrap with Ruby IRB

When you install Ruby on Raspberry Pi its interactive console, IRB, doesn't have console history. So if you enter a command incorrectly, you can't simply press the up arrow to get the old line back and change it. You have to type the whole command again.

A simple solution is to install rlwrap:

    sudo apt-get rlwrap

Then to run irb you simply do so via rlwrap:

    rlwrap irb


No comments: