IRB Console with history and logging

I spend most time with IRB or Rails/console. These are good settings on which I have settled with over the time. These will allow you to have basic logging and IRB history. Just put these in the ~/.irbrc file (If file doesn’t exist then create one).

Published by Shishir Sharma

Shishir Sharma is a hacker, software developer and a bachelor of electronics & communication engineering. He is a problem solver, technology enthusiast. He can speak in Java, Python, Perl, PHP, Curl etc; Fluent in C, C++, GNU/Linux. He is moderator at LUG-Jaipur. He loves action movies and Counter Strike.

Join the Conversation

4 Comments

  1. Do these settings go in the irb settings file? The post isn’t clear about what to *do* with all that text.

  2. 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. 🙂

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.