Last Updated: February 25, 2016
·
2.421K
· sheerun

Pry as default REPL (gem "pry")

echo "Pry.start || exit rescue LoadError" > ~/.irbrc

I use one-liner above because:

  • it fallbacks to irb if pry is not present
  • it leaves irb command unchanged
  • bundle console invokes pry only if it's specified as project's dependency (environment-aware)