l8azzq
Last Updated: February 25, 2016
·
614
· pedrocarrico
6f8526385111d6a9c4e6bc49582ae7cc

Add history to the ruby irb console

To add a nice bash-like history to the irb console:

vi ~/.irbrc

And add this (tweak the SAVE_HISTORY to your heart's content):

require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 100
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-history"

Now rejoice while running irb and navigating through your previous ruby commands :-)

Say Thanks
Respond

2 Responses
Add your response

4051
2aaae7041aca85da930bcaf14d6768d2

Wow, that made my day. Great! :-D

over 1 year ago ·
4055
Profile small

+1

over 1 year ago ·