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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
mrzasa
September 16, 2017
Programming
41
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Pry intro
PL: Wprowadzenie do pry - wygodnej konsoli Rubiego. Prezentacja z Rails Girls Rzeszów 2017
mrzasa
September 16, 2017
More Decks by mrzasa
See All by mrzasa
Magica Journey through Regex Engine Internals - T3chFest 2025
mrzasa
0
88
Debug Like a Scientist! Copenhagen Developers Festival 2024
mrzasa
1
100
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
89
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RubyConf BR
mrzasa
0
39
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RailsConf 2021
mrzasa
0
53
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
280
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
140
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
190
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
170
Other Decks in Programming
See All in Programming
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.7k
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
11
4.3k
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
270
New "Type" system on PicoRuby
pocke
1
980
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
Contextとはなにか
chiroruxx
1
340
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
590
ユニットテストの先へ:テスト技法で要求・仕様を整理するJava開発実践 / Beyond_Unit_Testing_Practical_Java_Development_Techniques_for_Organizing_Requirements_and_Specifications
shimashima35
0
410
技術的負債解消で開発者の未来を開く- AIの力でコード刷新
kmd2kmd
0
110
その問い、本当に正しいですか?AI時代のエンジニアに必要な哲学と認知科学 / ai-philosophy-cognitive-science
minodriven
11
5.9k
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.3k
CSC307 Lecture 17
javiergs
PRO
0
320
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.3k
So, you think you're a good person
axbom
PRO
2
2.1k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
71
40k
My Coaching Mixtape
mlcsv
0
150
Into the Great Unknown - MozCon
thekraken
41
2.6k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.5k
Between Models and Reality
mayunak
4
340
Testing 201, or: Great Expectations
jmmastey
46
8.2k
The Pragmatic Product Professional
lauravandoore
37
7.3k
How GitHub (no longer) Works
holman
316
150k
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