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
Desafios e Lições Aprendidas na Migração de Monólitos para Microsserviços em Java
jessilyneh
2
150
Jakarta EE meets AI
ivargrimstad
1
550
GoのIteratorに詳しくなってしまう
inatonix
1
210
エラーレスポンス設計から考える、0→1開発におけるGraphQLへの向き合い方
bicstone
5
1.5k
Modern Angular with the NGRX Signal Store New Rules for Your Architecture @BASTA! 2024 in Mainz
manfredsteyer
PRO
0
160
React + TextAliveでカッコいいLyric Applicatioinを作ろう!!
tosuri13
0
400
事業フェーズの変化に対応する 開発生産性向上のゼロイチ
masaygggg
0
220
Hermes: Better Performance with Bytecode Translation (React Universe 2024)
tmikov2023
0
100
Using Livebook to build and deploy internal tools @ ElixirConf 2024
hugobarauna
0
250
RAGの回答精度評価用のQAデータセットを生成AIに作らせた話
kurahara
0
260
o1モデルのプロンプトエンジニアリングって?
ktc_wada
0
300
Rubyのobject_id
qnighy
6
1.3k
Featured
See All Featured
4 Signs Your Business is Dying
shpigford
179
21k
What’s in a name? Adding method to the madness
productmarketing
PRO
21
3k
What's in a price? How to price your products and services
michaelherold
242
11k
Gamification - CAS2011
davidbonilla
79
5k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
3.9k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
Side Projects
sachag
451
42k
Faster Mobile Websites
deanohume
304
30k
Embracing the Ebb and Flow
colly
83
4.4k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Large-scale JavaScript Application Architecture
addyosmani
508
110k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
28
1.6k
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!