Tips and Tricks (Today I learned)

While you cannot run ri commands from inside an irb session, you can run ri commands from inside a pry session.


What are ri, irb and pry?

ri:
I have seen different (very talented) people saying that it’s abbreviated from different terms, like Ruby Information, Ruby Interactive and Ruby Index. No matter which term it stands for, it’s the Ruby tool for navigating documentation.

irb:
Interactive Ruby Shell is a REPL for Ruby.

pry:
A runtime developer console and IRB alternative with powerful introspection capabilities (as stated on its Github page). Installable as a Gem.



1 Like