When I run
I interpret you question as asking how to turn history on in the Rails Console and off in the Ruby debugger. If this isn't true, please clarify.
IRB, and by extension, the Rails Console, read from
~/.irbrc, or if that doesn't exist,
/etc/irbrc, to startup and configure irb. Your history is typically written to
~/.irb_history, but that is dictated by the contents of your
irbrc file. The
/etc/irbrc on my Mac OS X is set up to write the history from irb, so perhaps you've created a local
.irbrc that doesn't have history, or perhaps you have a syntax error in that file.
The debugger reads a file called
.rdebugrc on startup. You can turn off history in debug by adding this line to
set history save off
Turn it back on with:
set history save on
You could also set your debug output to go to a different file than irb reads from with the command:
set history filename
These also work from the debug prompt, but aren't persistent.