Pry is an alternative to IRB and sports many great features. Here I show how to integrate it into a Rails app, and how it can aid in debugging.
This week I spent some time learning how to use Pry. For those of you who havenât tried this wonderful alternative to IRB, spend two hours with it. Youâll never go back. I wonât be hitting on all the features Pry has to offer (because there are plenty), just the ones that immediately jumped out as useful to me. Pry has some of the best documentation and one of the friendliest, most helpful IRC cha
IRB is a great tool and is perfect for experimenting with small code samples and testing out new ideas. It has some difficulty however when the code samples become a bit larger or youâd like to start an IRB session half-way through a method, for example. Pry, in some sense, is IRB turned on its head. Instead of having to bring your code to a REPL session (as with IRB) you instead bring a REPL sess
ä¹ ã ã®æ´æ°ã ããã¡ãã£ã¨çã¾ãã«ãªããªãã¨ã ä»æ¥ã¯ãShibuya.rbã«åå ãã¦ãã¾ããã ä»åã®ã¡ã¤ã³ã®ãã¼ãã¯Rackããã«ã¦ã§ã¢ãèªãã£ã¦ãã¨ã§ã åèªãèªã¿ããããã«ãé¸ãã§ããã¼ãã«ã«åããã¦ã ããããèªãã§ã¿ãã¨ããæãã§ãã ç§ã¯ãRack::Auth::Basicãèªãã§ã¾ããã ã·ã³ãã«ã§ããã«å®çµãã¦ããã®ã§èªã¿ãããæãã ã£ãã¨æãã¾ãã ç§ã®ãã¼ãã«ã§ã¯ãçMacã ã£ãã®ã§ãç»é¢å ±æã使ã£ã¦ã åãç»é¢ã§ä¸ç·ã«ã½ã¼ã¹ãè¦ã¦ãé ã«è¿½ã£ã¦ããã¨ããæãã§ãèªãã§ã¿ã¾ããã ãã¼ãã«ãã¨ã«ã¢ãã¿ãããã°ãä¸ç·ã«èªãæã«ã¯ããªãæããã ãããã©ã ä¸ç¤ã«LTæ ããã£ãã®ã§ãçªçºã§è³æãç¡ãã«Pryã«ã¤ãã¦è©±ãããã¦ãããã¾ããã ãã¼ããã½ã¼ã¹ã³ã¼ããªã¼ãã£ã³ã°ã ã£ãã®ã§ãã æè¿ãã½ã¼ã¹ã³ã¼ããèªãã ããRailsã§specæ¸ãããããæã«ã ããã¯ä¾¿å©ã ï¼ã¨æã
Requiring a reasonable Ruby REPL? Give Pry a try. Itâs a gem install away with Rails integration not far behind. Today I give you a tour of Pry so you can decide if its right for you. In what follows, I show my personalized Pry preferences, .pryrc, and workflow. Pry differs a little bit of the box, but I will show you how to get set up and Iâll tell you where what I do differs from the default. Ba
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}