Skip to content

Instantly share code, notes, and snippets.

@elijahmurray
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elijahmurray/1be18cf331e7ae07668e to your computer and use it in GitHub Desktop.
Save elijahmurray/1be18cf331e7ae07668e to your computer and use it in GitHub Desktop.
Pry Development
# Launching Pry console session
pry -r ./config/environment
###############
###############
# Set a breakpoint with `binding.pry`
#Access shell mode
shell-mode
# Now you can run commands with a period in front of them.
.ls && .cd /app/models
#set your default editor
Pry.editor = "vim"
# edit a model or controller directly
edit MyCustomModel
# when done editting the file, close and save it, then reload the file and use it in the console
load 'app/models/my_custom_model.rb'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment