Skip to content

Instantly share code, notes, and snippets.

@estum
Last active December 27, 2015 20:39
Show Gist options
  • Save estum/7385645 to your computer and use it in GitHub Desktop.
Save estum/7385645 to your computer and use it in GitHub Desktop.
Custom "reload!" command for pry, which just restarts rails. Works with non-rails projects.
# .pryrc
Pry::Commands.create_command "reload!" do
description "Exits and runs again pry process"
def process
target.eval <<-EVAL
at_exit { puts "Reloading pry..."; exec "pry" }
exit
EVAL
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment