An online novel about the Source, the Force, the real life and everything in between...

Rails Tip #1: Use Pry Instead of Irb for the Rails Console

This tip is going to be a really short one. Hopefully by now you’ve heard about pry – a fantastic irb replacement, that somewhat reminds me of the mighty Lisp REPLs. What you might not know is how to hook it into Rails so that the rails console (a.k.a. rails c) command would fire a pry shell instead of an irb one. There are several ways to do so, but I find one particularly straightforward – the awesome little gem pry-rails.

So what are you waiting for? Go ahead, install the little sucker and enjoy your new pry-powered Rails console.