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
34
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
36
Debug Like a Scientist! Copenhagen Developers Festival 2024
mrzasa
1
79
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
69
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RubyConf BR
mrzasa
0
25
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RailsConf 2021
mrzasa
0
34
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
250
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
97
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
170
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
150
Other Decks in Programming
See All in Programming
Porting a visionOS App to Android XR
akkeylab
0
470
A full stack side project webapp all in Kotlin (KotlinConf 2025)
dankim
0
120
Node-RED を(HTTP で)つなげる MCP サーバーを作ってみた
highu
0
120
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
200
Code as Context 〜 1にコードで 2にリンタ 34がなくて 5にルール? 〜
yodakeisuke
0
130
5つのアンチパターンから学ぶLT設計
narihara
1
170
XP, Testing and ninja testing
m_seki
3
250
VS Code Update for GitHub Copilot
74th
2
650
AIエージェントはこう育てる - GitHub Copilot Agentとチームの共進化サイクル
koboriakira
0
590
生成AI時代のコンポーネントライブラリの作り方
touyou
1
220
Hack Claude Code with Claude Code
choplin
4
2.1k
Composerが「依存解決」のためにどんな工夫をしているか #phpcon
o0h
PRO
1
270
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
46
9.6k
Producing Creativity
orderedlist
PRO
346
40k
How to Think Like a Performance Engineer
csswizardry
25
1.7k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Building an army of robots
kneath
306
45k
Designing Experiences People Love
moore
142
24k
Git: the NoSQL Database
bkeepers
PRO
430
65k
Code Review Best Practice
trishagee
69
19k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.4k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
820
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