Skip to content

Instantly share code, notes, and snippets.

@gucki gucki/.irbrc
Created Sep 11, 2013

Embed
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')
else
IRB.conf[:HISTORY_FILE] = File.join(ENV['HOME'], '.irb-history')
end
@gucki

This comment has been minimized.

Copy link
Owner Author

commented Sep 11, 2013

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

@RouL

This comment has been minimized.

Copy link

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
You can’t perform that action at this time.