cheat sheets.

$ cheat console
--- console version 5	Sun Sep 23 16:07:49 +0000 2007
+++ console version 6	Sun Sep 23 16:21:44 +0000 2007
@@ -1,34 +1,40 @@
 Special Variables:
 
 app
 helper
 
 Specifying console environment (defaults to development):
 
 $ script/console production
 $ script/console test
 $ script/console development
 
 Loading a session for debugging:
 
 >> session =
 Marshal.load(File.open(’tmp/sessions/ruby_sess.8eb9614a7e4e1e3b’))
 => {”hash”=>{:cart=…
 >> cart = session[”hash”][:cart]
 
 Reloading the console:
 
 >> reload!
 
 
 Rollback all database changes on exit:
 
 $ script/console --sandbox 
 Loading development environment in sandbox.
 Any modifications you make will be rolled back on exit.
 >>
 
+To maintain history across console sessions, add the following to ~/.irbrc:
+
+require 'irb/ext/save-history'
+IRB.conf[:SAVE_HISTORY] = 100
+IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history"
+
 See also:
 
 $ cheat rails_console
( add new | see all )