Mon-Ouie / pry-remote

Connect to Pry remotely
Other
639 stars 81 forks source link

persist the client to wait for each session of pry server #50

Closed siong1987 closed 10 years ago

siong1987 commented 10 years ago

add a new option -r to keep pry-remote running and keep waiting for the next pry server session.

i encountered a bug and used a hack to fix it. since this is my first time using DRb, it will be cool if you guys can point me to the right way of doing this instead of the hack.

Mon-Ouie commented 10 years ago

I think I encountered the same bug when I tried implementing that feature, but I hadn't found a workaround (see #47, where someone had requested that feature). I don't know why it happens — I thought I might be missing something about DRb but it seems more like a bug on DRb's end. It would probably best to report it, but a workaround meanwhile is better than nothing. (I'll look at your patch a bit more tomorrrow.)

siong1987 commented 10 years ago

cool. :)

Mon-Ouie commented 10 years ago

Hey, Hey,

This does not seem to work as it is. My understanding is that the cleanup method will only raise that exception if there has been a second client. The first time it will raise a NoMethodError as you'd expect (it also does not work if the method exists it seems).

Does the new version that I pushed on master work for you ?

siong1987 commented 10 years ago

interesting. for some reason, the first version is enough to work for me. maybe instead of calling a cleanup, we can call a random method instead?

Mon-Ouie commented 10 years ago

No, if I try to calll a method that is actually defind the workaround ceases to work here.

siong1987 commented 10 years ago

yeah. it wouldn't work if you try to call a method that is actually defined. the good thing is that we control both the server/client side here. and, we are sure than cleanup method isn't defined on the server side, hence the workaround. :)