Skip to content

Instantly share code, notes, and snippets.

@gucki
Created September 11, 2013 12:54
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gucki/6523172 to your computer and use it in GitHub Desktop.
Save gucki/6523172 to your computer and use it in GitHub Desktop.
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
Copy link
Author

gucki commented Sep 11, 2013

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

@RouL
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