Pry

Pry is an interactive shell for the Ruby programming language. It is notable for its Smalltalk-inspired ability to start a REPL within a running program. This lets programmers debug and modify the current state of a system.

Pry project is hosted from pryrepl.org .

There are good arguments for running pry over irb. Ruby people (rubles?) summarize this as "pry blew my mind".

# Installing `gem install pry pry-doc`

# Recommendations * pry-byebug - use Pry with byebug. * pry-rails - use Pry for rails console (`rails c`)

# Tricks

If you're in a project and have some common stuff you want to load into your repl environment, well pry supports rc files! Here's an awesome one to start you off:

files = Dir["lib/*.rb"] if files.size > 0 puts "autoloading..." files.each do |file| puts " require_relative #{file}" require_relative file end end