I spend most of my time working with IRB or Rails/console. I have settled on these settings over time as they provide basic logging and IRB history. To use them, simply add the following lines to the ~/.irbrc file (create the file if it doesn’t already exist):
IRB Console with history and logging
by
Tags:
Comments
4 responses to “IRB Console with history and logging”
-
Do these settings go in the irb settings file? The post isn’t clear about what to *do* with all that text.
-
Thanks for pointing out. These goes in ~/.irbrc
-
-
On line 17 of the code preview your logic is:
result = !condition_a && !condition_b
From boolean algebra,
a’.b’ = (a + b)’Reducing it in terms of boolean algebra, a more correct, and understandable statement could be
result = ! (condition_a || condition_b)
The statement would become:
irb_console_running = (rails_running or script_console_running) ‘This is also more intuitive. 🙂
-
That is one way. If you like it you can change it in your.irbrc 🙂
-
Leave a Reply