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 intro
Search
mrzasa
September 16, 2017
Programming
0
35
Pry intro
PL: Wprowadzenie do pry - wygodnej konsoli Rubiego. Prezentacja z Rails Girls Rzeszów 2017
mrzasa
September 16, 2017
Tweet
Share
More Decks by mrzasa
See All by mrzasa
Magica Journey through Regex Engine Internals - T3chFest 2025
mrzasa
0
48
Debug Like a Scientist! Copenhagen Developers Festival 2024
mrzasa
1
88
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
73
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RubyConf BR
mrzasa
0
30
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RailsConf 2021
mrzasa
0
38
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
260
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
100
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
170
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
160
Other Decks in Programming
See All in Programming
フロントエンド開発に役立つクライアントプログラム共通のノウハウ / Universal client-side programming best practices for frontend development
nrslib
7
3.9k
登壇は dynamic! な営みである / speech is dynamic
da1chi
0
110
Pythonスレッドとは結局何なのか? CPython実装から見るNoGIL時代の変化
curekoshimizu
5
1.5k
私達はmodernize packageに夢を見るか feat. go/analysis, go/ast / Go Conference 2025
kaorumuta
2
500
非同期jobをtransaction内で 呼ぶなよ!絶対に呼ぶなよ!
alstrocrack
0
560
CSC305 Lecture 01
javiergs
PRO
1
400
技術的負債の正体を知って向き合う / Facing Technical Debt
irof
0
120
Signals & Resource API in Angular: 3 Effective Rules for Your Architecture @BASTA 2025 in Mainz
manfredsteyer
PRO
0
110
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
8
4.1k
Breaking Up with Big ViewModels — Without Breaking Your Architecture (droidcon Berlin 2025)
steliosf
PRO
1
350
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
140
uniqueパッケージの内部実装を支えるweak pointerの話
magavel
0
940
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
42
2.8k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Docker and Python
trallard
46
3.6k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.7k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
45
2.5k
Git: the NoSQL Database
bkeepers
PRO
431
66k
A Modern Web Designer's Workflow
chriscoyier
697
190k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.7k
A better future with KSS
kneath
239
17k
Being A Developer After 40
akosma
91
590k
How to train your dragon (web standard)
notwaldorf
96
6.3k
Transcript
PRY WYGODNA KONSOLA RUBIEGO Maciek Rząsa @mjrzasa
INSTALACJA Z konsoli: $ gem install pry pry-doc W projekcie:
# Gemfile gem 'pry-rails' gem 'pry-doc' # Konsola: $ bundle install
EKSPERYMENTY Przydatne funkcje dopełnianie składni (Tab) podświetlanie składni
POZNAWANIE RUBIEGO pry> help # wyświetl opis komend pry pry>
name = "rails girls" pry> ls # wyświetl dostępne funckcje i zmienne pry> ls name # wyświetl metody obiektu pry> show-doc name.size # wyświetl opis metody pry> show-source name.size # wyświetl kod metody pry> wtf? # informacje o ostatnim błędzie
PODGLĄD APLIKACJI Aby zatrzymać wykonywanie programu: $ rails console pry>
User.count pry> User.find(1) pry> User.where(email: '
[email protected]
')
SZUKANIE BŁĘDÓW Aby zatrzymać wykonywanie programu: require 'pry' binding.pry #
wyświetla kod otaczający bieżące miejsce pry> whereami
PO CO PRY - PODSUMOWANIE szybkie eksperymenty poznawanie dokumentacji i
źródeł szukanie błędów