News for hackers. Stuff that matters.
Re:Using pry in production by colinbartlett on Friday February 14, 2014 @06:55PM (#7241926)
If you use pry in production on heroku you don't need to do anything special like have a separate machine. Since every time you run it, Heroku spins up a new dyno, it has zero effect on the rest of your running platform.
Re:Using pry in production by Titanous on Friday February 14, 2014 @07:50PM (#7242095)
Until you start making ActiveRecord calls...
Re:Using pry in production by rb2k_ on Friday February 14, 2014 @07:56PM (#7242110)
Unrelated to pry, related to bugsnag:

Thanks for providing the service. We use it at Acquia for Ruby, PHP and Javascript and are really happy with the product. We've discovered quite a few small edge cases and hickups in our apps. They happen rarely and mostly with older accounts / random network timeouts / ... and while they don't really bother users, they are still fun to fix :)

Re:Using pry in production by MaxGabriel on Friday February 14, 2014 @06:38PM (#7241848)
Cool. I'd really like to use pry for my production console. Is there a way to start a Rails Pry console in production without forcing my coworkers to do the same?

A slight twist on 'Pry in Production' I've done is to drop a call to `binding.pry` in the code on a staging server. Then I can step through production data and inspect what's going on.

Re:Using pry in production by coderaptor on Friday February 14, 2014 @09:32PM (#7242386)
> $ RAILS_ENV=production bin/pry -r ./config/environment
Re:Using pry in production by michaelmior on Friday February 14, 2014 @06:49PM (#7241907)
Installing the pry gem doesn't stop anyone from using irb if they prefer.
Re:Using pry in production by MaxGabriel on Friday February 14, 2014 @08:56PM (#7242291)
The way the article does it (using pry rails) will make 'rails console' use pry, so it does affect my coworkers.

https://github.com/rweng/pry-rails/blob/master/Readme.md

Re:Using pry in production by michaelmior on Friday February 14, 2014 @09:21PM (#7242360)
Ah, got it. I misunderstood your question.
Re:Using pry in production by ufmace on Friday February 14, 2014 @09:14PM (#7242345)
That's pretty cool. What I'd really like to know, though, is if anybody knows how to drop into a pry-debugger debug session during a unit test.
Re:Using pry in production by snmaynard on Friday February 14, 2014 @11:17PM (#7242646)
You can use https://github.com/ConradIrwin/pry-rescue#rspec pry-rescues rspec integration to automatically fall into pry when a test fails
Re:Using pry in production by hopsoft on Saturday February 15, 2014 @02:19AM (#7243009)
I built a small testing framework with a pry workflow as one of it's goals. It's possible to run the tests in pry mode which drops you into a pry session on test failure. I've used it on several small libs & the test+pry workflow is quite nice. https://github.com/hopsoft/micro_test
Re:Using pry in production by MaxGabriel on Friday February 14, 2014 @10:53PM (#7242597)
Just binding.pry works for me in rspec. Does that not work for you?
Re:Using pry in production by ufmace on Saturday February 15, 2014 @12:22PM (#7244419)
Thanks, I'll give it a try, though I'm using Minitest. I haven't really tried much yet on that front; I mostly just got to the point of realizing that this issue I'm working on now is really going to be a pain to get figured out without a debugger.

For this project, I just switched, like a month or so ago, to an all-Vim workflow. I mostly feel more productive in it so far, but a real debugger is the one thing that I had been putting off figuring out.

Re:Using pry in production by mrinterweb on Saturday February 15, 2014 @03:52AM (#7243142)
That's what I was going to recommend. I use "binding.pry" in my specs frequently. Just be sure to take it out before you commit ;)
Re:Using pry in production by mchail on Saturday February 15, 2014 @04:46PM (#7245486)
The prompt customization is a great idea! My team just added it to our production build.