guard/guard — Issue #204: No Stty breaking guard on windows
Author: diedthreetimes
Created: 2011-12-24 06:25:11+00:00
State: open

It appears as if the use of `stty` in ReadlineInteractor#store_terminal_settings is breaking guard on windows. (see the full error below) Commenting out the use of `stty` in both 'store_terminal_settings' and 'restore_terminal_settings' seemed to fix the issue, but the command line seemed oddly slow.

Using the --no-interactions flag also resolved the issue.

I'm using windows 7 and ruby 1.9.2

Here is my full bundle

Gems included by the bundle:
* bundler (1.0.21)
* diff-lcs (1.1.3)
* ffi (1.0.11)
* guard (0.9.3)
* guard-rspec (0.5.10)
* ip_tracker (0.0.1 b0dafc1)
* mime-types (1.17.2)
* rb-notifu (0.0.4)
* rb-readline (0.4.2)
* rest-client (1.6.7)
* rspec (2.7.0)
* rspec-core (2.7.1)
* rspec-expectations (2.7.0)
* rspec-mocks (2.7.0)
* thor (0.14.6)
* win32-api (1.4.8)
* win32-changenotify (0.5.1)
* win32-event (0.5.2)
* win32-ipc (0.5.3)
* win32console (1.3.0)
* windows-api (0.4.0)
* windows-pr (1.2.1)

c:/Ruby192/lib/ruby/gems/1.9.1/gems/guard-0.9.3/lib/guard/interactors/readline.r
b:91:in ``': No such file or directory - stty -g (Errno::ENOENT)
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/guard-0.9.3/lib/guard/interacto
rs/readline.rb:91:in `store_terminal_settings'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/guard-0.9.3/lib/guard/interacto
rs/readline.rb:34:in `start'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/guard-0.9.3/lib/guard.rb:181:in
`start'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/guard-0.9.3/lib/guard/cli.rb:74
:in `start'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22
:in `run'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation
.rb:118:in `invoke_task'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor.rb:263:in
`dispatch'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:38
9:in `start'
from c:/Ruby192/lib/ruby/gems/1.9.1/gems/guard-0.9.3/bin/guard:6:in `'
from c:/Ruby192/bin/guard:19:in `load'
from c:/Ruby192/bin/guard:19:in `

'