Nothing Works the Way You Think It Does. It's a familiar scene: the code doesn't work. Not only does it not work, but it makes no sense whatsoever that it doesn't work. You've checked the code several times, and it's just not possible that it's broken. But it is.
In Ruby, you can debug and test your code using IRB, short for Interactive Ruby, a quick way to explore the Ruby programming language and try out code without creating a file. IRB is a Read-Eval-Print Loop, or REPL (7 Minutes), a tool offered by many modern programming languages. To use it, you launch the irb
executable and type your Ruby code at the prompt. IRB evaluates the code you type and displays the results.
However, IRB is not without its limitations, and this is where Pry comes in. Pry present's itself as a powerful IRB alternative and runtime developer console for Ruby. However, it is much, much more than that.