7sxfzq
Last Updated: February 25, 2016
·
975
· natansh
33c5b27d9e26a76f70afb5e5cceb0b14

Pry - An IRb Alternative

Pry is an excellent alternative to IRb with syntax highlighting and proper indentation.

You can install pry by simply running the command

gem install pry

And then on the command line, run it!

> pry

But the best thing about pry is that it brings an REPL (read-eval-print-loop) session directly to your code! Just do the following.

require 'pry'
# Code above
binding.pry
#Code below

and it will display the session at the point where you've placed the method. You can play around with your code and then exit with the command exit.

For more details, check out
* Pry Home

Say Thanks
Respond