Skip to content

Instantly share code, notes, and snippets.

@mchail
Last active July 14, 2022 18:49
Show Gist options
  • Save mchail/ed6472565a66523a5b2237d07e30b142 to your computer and use it in GitHub Desktop.
Save mchail/ed6472565a66523a5b2237d07e30b142 to your computer and use it in GitHub Desktop.
ruby pry tips
# getting context – what can this thing do?
show-source
$ Sidekiq
$ Sidekiq.queues=
ls Sidekiq
cd Sidekiq
whereami
ls
$ dump_json
cd .. # or `exit`
p Sidekiq.methods;
# breakpoints
binding.pry
binding.pry
break
break Sidekiq.options
exit
Sidekiq.options
whereami
break --help
# other stuff!
_
hist
hist --help
_out_
ctrl+r
edit
wtf?
$!, $@
raise :hell
begin; raise :hell; rescue; puts $!, $@; end
.pryrc
`ls`
.ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment