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
31
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
Debug Like a Scientist! Copenhagen Developers Festival 2024
mrzasa
1
55
API Optimization Tale: Monitor, Fix and Deploy (on Friday). GopherCon Europe 2023
mrzasa
0
59
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RubyConf BR
mrzasa
0
21
API Optimization Tale: Monitor, Fix and Deploy (on Friday). RailsConf 2021
mrzasa
0
32
API Optimization Tale: Monitor, Fix and Deploy (on Friday). Italian Ruby Day
mrzasa
0
230
I Can Kill Your Browser With a Simple Regexp. Workshop
mrzasa
0
81
[PL] Kto to jest senior developer? - 4Developers 2019
mrzasa
0
150
[PL] (HackYeah) Nie ma nic prostszego niż napisanie wolnego regexpa
mrzasa
0
150
Writing slow regexp is easier than you think (and want it to be)
mrzasa
0
400
Other Decks in Programming
See All in Programming
チームリードになって変わったこと
isaka1022
0
200
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
47
17k
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
160
バックエンドのためのアプリ内課金入門 (サブスク編)
qnighy
8
1.8k
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
130
クリーンアーキテクチャから見る依存の向きの大切さ
shimabox
2
380
Formの複雑さに立ち向かう
bmthd
1
850
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
220
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
一休.com のログイン体験を支える技術 〜Web Components x Vue.js 活用事例と最適化について〜
atsumim
0
510
ARA Ansible for the teams
kksat
0
150
苦しいTiDBへの移行を乗り越えて快適な運用を目指す
leveragestech
0
610
Featured
See All Featured
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
YesSQL, Process and Tooling at Scale
rocio
172
14k
How to train your dragon (web standard)
notwaldorf
91
5.8k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
KATA
mclloyd
29
14k
Site-Speed That Sticks
csswizardry
4
380
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
Raft: Consensus for Rubyists
vanstee
137
6.8k
Visualization
eitanlees
146
15k
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