Wisdom from Ivan« an older post
a newer one »Flight deals

Have ruby irb console save history


Add this to your ~/.irbrc file (creating one if it doesn't already exist):

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

Boom! Last 200 commands are saved, such that you can up arrow / command-p or down arrow / command-n to move through your ruby console history!



In rails, add two weeks to a date:

Time.now + 2.week.to_i

Add new comment