Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Pry: IRB on vitamins
Search
iamjarvo
August 14, 2012
Programming
2
120
Pry: IRB on vitamins
Pry is a REPL that is an alternative to IRB.
iamjarvo
August 14, 2012
Tweet
Share
More Decks by iamjarvo
See All by iamjarvo
Git productivity and tricks
iamjarvo
2
170
Other Decks in Programming
See All in Programming
Introducing ReActionView: A new ActionView-compatible ERB Engine @ Rails World 2025, Amsterdam
marcoroth
0
530
Jakarta EE Core Profile and Helidon - Speed, Simplicity, and AI Integration
ivargrimstad
0
340
Ruby Parser progress report 2025
yui_knk
1
290
詳解!defer panic recover のしくみ / Understanding defer, panic, and recover
convto
0
220
AWS発のAIエディタKiroを使ってみた
iriikeita
1
160
Kiroの仕様駆動開発から見えてきたAIコーディングとの正しい付き合い方
clshinji
1
200
Swift Updates - Learn Languages 2025
koher
2
440
奥深くて厄介な「改行」と仲良くなる20分
oguemon
1
420
1から理解するWeb Push
dora1998
6
1.6k
速いWebフレームワークを作る
yusukebe
5
1.7k
Namespace and Its Future
tagomoris
6
690
CJK and Unicode From a PHP Committer
youkidearitai
PRO
0
110
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
55
13k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
How GitHub (no longer) Works
holman
315
140k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
51
5.6k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
Code Review Best Practice
trishagee
70
19k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Producing Creativity
orderedlist
PRO
347
40k
Become a Pro
speakerdeck
PRO
29
5.5k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
Transcript
Pry IRB on vitamins
Who am I? • Jearvon Dharrie • Twitter: @jearvon •
irc: iamjarvo
What is pry? • REPL(read, eval, print loop) • Powerful
alternative to IRB
High level view • Syntax highlighting / Proper Indentation •
Customizable • Quick documentation lookup • Quick monkey patching • Great debugging tool • Gist capabilities
Pry in my day to day • Debugging • Documentation
lookup
Installation • gem i pry pry-doc (reading stuff written in
c) • pry • help
Now the cool stuff!
Documentaion • show-doc Array#take_while • a = [1, 2, 3]
• show-doc a.take_while
Viewing Source • show-source Array#take_while -l • a = [1,2,3]
• show-source a.take_while -l
Gist • Install jist gem ( https://github.com/conradirwin/) • jist --login
• gist -m Array#take_while • gist -m a.take_while
Easily cd into a gem • gem-cd “gem name”
Shell commands • Prefix commands with . • .pwd •
.ls
REPL capabilities • input buffer multiline text waiting to be
completed • ! clears input buffer • show-input => shows the current input buffer • amend-line N replacement
Navigating around • cd object • ls • can grep
output of ls • ls -h
Patching on the fly
Current state
Rails console • Alias pryr to launch pry with rails
environment • pry -r ./config/environment
Plugins • pry-debugger • pry-remote • pry-stack_explorer • pry-theme •
pry-debundle
.pryrc • Alias commands • set colorscheme
From here • #pry on freenode • give it a
pry!