I have to type every key twice when using pry or debugger in my specs #149

hardipe opened this Issue Oct 2, 2011 · 6 comments


None yet
3 participants

hardipe commented Oct 2, 2011

Guard 0.8.3 straight from git

I am using guard only for rspec at the moment, no cucumber, but the problem was there with rspec + cucumber as well.

The problem appeared only recently, not sure in which version number though.
When I put binding.pry or debugger into my rspecs, most of the time when the specs run i get this weird problem where I have to type every key twice to get the input to go through to the prompt line of debugger or pry.
So, to get the input line to read "continue" I'd have to type ccoonnttiinnuuee

when guard finishes the specs and waits for possible interactions, such as "pause" or "reload", i can type just fine.
When I insert a simple "gets" instead of the "debugger" or "binding.pry" i can input just fine.

The problem appears with both debugger and pry and occurs in about 90% of the cases after i start guard.

Any ideas on how I can help you debug this, maybe even on linux level to see where my input is actually going - every second keypress seems to disappear or get ignored. Outside of guard, pry and debugger work well.

hardipe commented Oct 2, 2011

The problem might be related to this issue:

I'm also using ruby-1.9.2-p290 / MRI if that matters

hardipe closed this Oct 2, 2011

hardipe reopened this Oct 2, 2011


thibaudgg commented Oct 2, 2011

Please can you try Guard 0.8.2 to see if it works as excepted. It can come from this commit (Interactor is maybe no more locked properly)

hardipe commented Oct 2, 2011

Hello thibaudgg

Thanks for the help on this. I tried 0.8.2 and it works as you guessed correctly.
Before, I also downgraded to 0.6.3 as i thought it might have to do with the new interactions feature. 0.6.3 worked as well, so most likely it is what you think it is.

I hope this is enough data to be an actual and useful bug report and that it gets fixed soon. Meanwhile, using 0.8.2 is the solution.

Thanks again!


thibaudgg commented Oct 2, 2011

Reported on the pull request.


f1sherman commented Oct 2, 2011

Great catch @hardipe! I did not anticipate that the interactor thread would continue to capture input from stdin while guards are running, but that appears to be what was happening. Sorry about that.

Pull request submitted here:

hardipe commented Oct 3, 2011

No problem, glad I could help with this. Guard has been very useful for me, especially when combined with Spork.

Thanks for the work you are doing guys.

hardipe closed this Oct 3, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment