Skip to content


Subversion checkout URL

You can clone with
Download ZIP


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

hardipe opened this Issue · 6 comments

3 participants


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.


The problem might be related to this issue:

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

@hardipe hardipe closed this
@hardipe hardipe reopened this

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)


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!


Reported on the pull request.


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:


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 hardipe closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.