Skip to content

Instantly share code, notes, and snippets.

Created Sep 11, 2013
What would you like to do?
irb history per rails project
# ~/.irbrc
require 'irb/completion'
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 1000
if defined?(::Rails)
IRB.conf[:HISTORY_FILE] = File.join(ENV['PWD'], '.irb-history')
IRB.conf[:HISTORY_FILE] = File.join(ENV['HOME'], '.irb-history')
Copy link

gucki commented Sep 11, 2013

Dont't forget to put .irb-history in your .gitignore file.. :)

Copy link

RouL commented Feb 10, 2017

This is really helpful. Thanks. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment