require 'rubygems' unless defined? Gem # only needed in 1.8 require 'irb/ext/save-history' IRB.conf[:SAVE_HISTORY] = 5000 IRB.conf[:HISTORY_FILE] = "#{ENV['XDG_CACHE_HOME']}/irb/history"