Skip to content

Problems on Windows #149

Open
azt3k opened this Issue Oct 13, 2013 · 79 comments
@azt3k
azt3k commented Oct 13, 2013
  1. Polling doesn't auto start on windows when WDM is not present
  2. WDM v0.1.0 does not work with guard 2.0.x

Notes:

  • polling can be forced via by using the--force-polling option under windows by conditionally sniffing the target os via RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i and the guard daemon starts normally.
  • polling is not a great way of watching changes as it can take up to 5 minutes for it to see changes and I find myself manually triggering change events.

Re: 1 Below is a stack trace when WDM is not included in Gemfile

$ bundle exec guard --debug --guardfile "c:/path/to/Guardfile"

11:39:44 - INFO - Using Guardfile at c:/path/to/Guardfile.
11:39:46 - DEBUG - Command execution: emacsclient --eval '1' 2> NUL || echo 'N/A'
11:39:46 - INFO - Guard is using TerminalTitle to send notifications.
11:39:46 - DEBUG - Command execution: hash stty
11:39:46 - DEBUG - Guard starts all plugins
11:39:46 - DEBUG - Hook :start_begin executed for Guard::CoffeeScript
11:39:46 - DEBUG - Hook :start_end executed for Guard::CoffeeScript
11:39:46 - DEBUG - Hook :start_begin executed for Guard::Sass
11:39:46 - DEBUG - Hook :start_end executed for Guard::Sass
11:39:46 - DEBUG - Hook :start_begin executed for Guard::Sass
11:39:46 - DEBUG - Hook :start_end executed for Guard::Sass
11:39:46 - INFO - Guard is now watching at 'c:/path/to/project'
  Please add the following to your Gemfile to avoid polling for changes:
    require 'rbconfig'
    gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i

c:/path/to/project/vendor/ruby/1.9.1/gems/listen-2.1.0/lib/listen/adapter.rb:37:in `_warn_polling_fallback': undefined method `gsub' for nil:NilClass (oMethodError)
        from c:/path/to/project/vendor/ruby/1.9.1/gems/listen-2.1.0/lib/listen/adapter.rb:24:in `_select'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/listen-2.1.0/lib/listen/adapter.rb:14:in `new'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/listen-2.1.0/lib/listen/listener.rb:118:in `_init_actors'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/listen-2.1.0/lib/listen/listener.rb:37:in `start'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/guard-2.0.5/lib/guard/commander.rb:30:in `block in start'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/guard-2.0.5/lib/guard/commander.rb:108:in `block in within_preserved_state'
        from <internal:prelude>:10:in `synchronize'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/guard-2.0.5/lib/guard/commander.rb:105:in `within_preserved_state'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/guard-2.0.5/lib/guard/commander.rb:26:in `start'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/guard-2.0.5/lib/guard/cli.rb:96:in `start'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in`start'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/guard-2.0.5/bin/guard:6:in `<top (required)>'
        from c:/path/to/project/vendor/ruby/1.9.1/bin/guard:23:in `load'
        from c:/path/to/project/vendor/ruby/1.9.1/bin/guard:23:in `<main>'

Re: 2 When wdm is included in the bundle the daemon silently exits:

AzT3k@AZT3K-E /C/path/to/project (master)
$ bundle exec guard --debug  --guardfile "c:/path/to/Guardfile"

11:52:27 - INFO - Using Guardfile at c:/path/to/Guardfile.
11:52:28 - DEBUG - Command execution: emacsclient --eval '1' 2> NUL || echo 'N/A'
11:52:28 - INFO - Guard is using TerminalTitle to send notifications.
11:52:28 - DEBUG - Command execution: hash stty
11:52:28 - DEBUG - Guard starts all plugins
11:52:28 - DEBUG - Hook :start_begin executed for Guard::CoffeeScript
11:52:28 - DEBUG - Hook :start_end executed for Guard::CoffeeScript
11:52:28 - DEBUG - Hook :start_begin executed for Guard::Sass
11:52:28 - DEBUG - Hook :start_end executed for Guard::Sass
11:52:28 - DEBUG - Hook :start_begin executed for Guard::Sass
11:52:28 - DEBUG - Hook :start_end executed for Guard::Sass
11:52:28 - INFO - Guard is now watching at 'c:/path/to/project'
11:52:28 - DEBUG - Start interactor

AzT3k@AZT3K-E /C/path/to/project (master)
$

The contents of the Gemfile and Guardfile are available here: guard/guard#492

@thibaudgg
Guard member

Could you please checkout Listen master and try to run the spec suite with CI=true bundle exec rspec and paste the output here. Thanks!

@azt3k
azt3k commented Oct 14, 2013
AzT3k@AZT3K-E /C/_temp/listen (master)
$ bundle install --path vendor
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake (10.1.0)
Using bundler (1.3.5)
Installing timers (1.1.0)
Installing celluloid (0.15.2)
Installing coderay (1.0.9)
Installing multi_json (1.8.1)
Installing mime-types (1.25)
Installing rest-client (1.6.7)
Installing simplecov-html (0.7.1)
Installing simplecov (0.7.1)
Installing tins (0.12.0)
Installing term-ansicolor (1.2.2)
Installing thor (0.18.1)
Installing coveralls (0.7.0)
Installing diff-lcs (1.2.4)
Installing ffi (1.9.0)
Installing formatador (0.2.4)
Installing rb-fsevent (0.9.3)
Installing rb-inotify (0.9.2)
Using listen (2.1.0) from source at c:/Design/Projects/ABC/_temp/listen
Installing lumberjack (1.0.4)
Installing method_source (0.8.2)
Installing slop (3.4.6)
Installing win32console (1.3.2)
Installing pry (0.9.12.2)
Installing guard (2.0.5)
Installing rspec-core (2.14.5)
Installing rspec-expectations (2.14.3)
Installing rspec-mocks (2.14.3)
Installing rspec (2.14.1)
Installing guard-rspec (4.0.1)
Installing rspec-retry (0.2.1)
Installing wdm (0.1.0)
Installing yard (0.8.7.2)
Your bundle is complete!
It was installed into ./vendor

AzT3k@AZT3K-E /C/_temp/listen (master)
$ export CI=true && bundle exec rspec
←[32m[Coveralls] Set up the SimpleCov formatter.←[0m
←[32m[Coveralls] Using SimpleCov's default settings.←[0m
You must use ANSICON 1.31 or later (http://adoxa.3eeweb.com/ansicon/) to use colour on Windows
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Listen
  with one listen dir
    with change block raising

@thibaudgg
Guard member

Ok same as before, if you launch just some specific specs:

  • export CI=true && bundle exec rspec spec/lib/listen/adapter_spec.rb
  • export CI=true && bundle exec rspec spec/lib/listen/adapter
@azt3k
azt3k commented Oct 14, 2013
$ export CI=true && bundle exec rspec spec/lib/listen/adapter_spec.rb
←[32m[Coveralls] Set up the SimpleCov formatter.←[0m
←[32m[Coveralls] Using SimpleCov's default settings.←[0m
You must use ANSICON 1.31 or later (http://adoxa.3eeweb.com/ansicon/) to use colour on Windows
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Listen::Adapter
  .new
←[32m    returns Polling adapter if forced←[0m
←[32m    returns Windows adapter when usable←[0m
←[32m    returns Darwin adapter when usable←[0m
←[32m    returns Linux adapter when usable←[0m
←[32m    returns BSD adapter when usable←[0m
    no usable adapters
←[32m      returns Polling adapter←[0m
←[32m      warns polling fallback with default message←[0m
←[32m      warns polling fallback with custom message if set←[0m
←[32m      doesn't warn if polling_fallback_message is false←[0m

Finished in 0.13102 seconds
←[32m9 examples, 0 failures←[0m

Randomized with seed 28116

←[33m[Coveralls] Submitting with config:←[0m
←[33m{
  "environment": {
    "pwd": "c:/_temp/listen",
    "rails_root": null,
    "simplecov_root": "c:/_temp/listen",
    "gem_version": "0.7.0"
  },
  "git": {
    "head": {
      "id": "'63a588b45b63da213a1292a960e5ffb69c800157'",
      "author_name": "'Thibaud Guillaume-Gentil'",
      "author_email": "'thibaud@thibaud.me'",
      "committer_name": "'Thibaud Guillaume-Gentil'",
      "committer_email": "'thibaud@thibaud.me'",
      "message": "'Release 2.1.0'"
    },
    "branch": "master",
    "remotes": [
      {
        "name": "origin",
        "url": "git@github.com:guard/listen.git"
      }
    ]
  }
}←[0m
←[36m[Coveralls] Submitting to https://coveralls.io/api/v1←[0m
←[31m[Coveralls] API internal error occured, we're on it!←[0m
Coverage is at 30.23%.
Coverage report sent to Coveralls.
$ export CI=true && bundle exec rspec spec/lib/listen/adapter
←[32m[Coveralls] Set up the SimpleCov formatter.←[0m
←[32m[Coveralls] Using SimpleCov's default settings.←[0m
You must use ANSICON 1.31 or later (http://adoxa.3eeweb.com/ansicon/) to use colour on Windows
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Listen::Adapter::Base
  #_notify_change
    listener doesn't listen
←[32m      calls change on change_pool asynchronously←[0m
    listener listen
←[32m      calls change on change_pool asynchronously←[0m
  #_latency
←[32m    returns latency from listener actor if present←[0m
←[32m    returns default_latency with listener actor latency not present←[0m

Listen::Adapter::Darwin
←[32m  isn't usable on Windows←[0m

Listen::Adapter::BSD
←[32m  isn't usable on Windows←[0m

Listen::Adapter::Polling
  .usable?
←[32m    returns always true←[0m
  #_latency
←[32m    returns latency from listener actor if present←[0m
←[32m    returns default_latency with listener actor latency not present←[0m
  #start
←[32m    notifies change on every listener directories path←[0m

Listen::Adapter::Linux
←[32m  isn't usable on Windows←[0m

Listen::Adapter::Windows
  .usable?
←[32m    requires wdm gem←[0m
←[32m    returns always true←[0m

Finished in 0.17152 seconds
←[32m13 examples, 0 failures←[0m

Randomized with seed 9577

←[33m[Coveralls] Submitting with config:←[0m
←[33m{
  "environment": {
    "pwd": "c:/_temp/listen",
    "rails_root": null,
    "simplecov_root": "c:/_temp/listen",
    "gem_version": "0.7.0"
  },
  "git": {
    "head": {
      "id": "'63a588b45b63da213a1292a960e5ffb69c800157'",
      "author_name": "'Thibaud Guillaume-Gentil'",
      "author_email": "'thibaud@thibaud.me'",
      "committer_name": "'Thibaud Guillaume-Gentil'",
      "committer_email": "'thibaud@thibaud.me'",
      "message": "'Release 2.1.0'"
    },
    "branch": "master",
    "remotes": [
      {
        "name": "origin",
        "url": "git@github.com:guard/listen.git"
      }
    ]
  }
}←[0m
←[36m[Coveralls] Submitting to https://coveralls.io/api/v1←[0m
←[31m[Coveralls] API internal error occured, we're on it!←[0m
Coverage is at 53.9%.
Coverage report sent to Coveralls.
@thibaudgg
Guard member

Ok if this specs work, I really don't understand why you got

c:/path/to/project/vendor/ruby/1.9.1/gems/listen-2.1.0/lib/listen/adapter.rb:37:in `_warn_polling_fallback': undefined method `gsub' for nil:NilClass (oMethodError)
        from c:/path/to/project/vendor/ruby/1.9.1/gems/listen-2.1.0/lib/listen/adapter.rb:24:in `_select'
        from c:/path/to/project/vendor/ruby/1.9.1/gems/listen-2.1.0/lib/listen/adapter.rb:14:in `new'

with bundle exec guard --debug --guardfile "c:/path/to/Guardfile" without wdm.

As I don't have a Windows machine with c extension working I'm not able to debug wdm adapter myself, feel free to play with Listen windows adapter code and submit pull request. Thanks in advance!

Regarding polling being slow, try to ignore a maximum of useless files and change latency option.

@thibaudgg
Guard member

I just release 2.1.1 with a fix on adapter, could you please give it a try with wdm.

@azt3k
azt3k commented Oct 17, 2013

Same result sorry - i.e. looks like its working at then exits - as per output above.

Will stick to 1.8.3 for the time being and will have a look at the wdm adapter when I get a chance

@thibaudgg
Guard member

Ok thanks.

@isimmons
isimmons commented Nov 4, 2013

After reading this I dropped back to 1.8.3 to test and it's working so far with sass and livereload.

Windows 7 64bit with 32bit ruby
ruby 1.9.3p429
guard-1.8.3
listen-1.3.1
guard-sass-1.3.2
guard-livereload-1.4.0

@nilliams
nilliams commented Nov 4, 2013

listen 2.2.0
ruby 1.9.3p448 [i386-mingw32]
Windows 7 (32bit)

I can verify that simply running the Listen example in the readme, ie:

listener = Listen.to('dir/to/listen', 'dir/to/listen2') do |modified, added, removed|
  puts "modified absolute path: #{modified}"
  puts "added absolute path: #{added}"
  puts "removed absolute path: #{removed}"
end
listener.start # not blocking
sleep

... if wdm is present, then the script exits silently (despite the sleep).

With wdm not present, it works as expected.

@isimmons
isimmons commented Nov 4, 2013

Just did the same as @nilliams by gem update followed by gem uninstall wdm and I get the following message

C:\Users\lotus\laracasts\l40>guard
14:58:54 - INFO - Guard is using TerminalTitle to send notifications.
14:58:54 - INFO - Guard is now watching at 'C:/Users/lotus/laracasts/l40'
14:58:54 - INFO - LiveReload is waiting for a browser to connect.
  Please add the following to your Gemfile to avoid polling for changes:
    require 'rbconfig'
    gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i

It works like this but is extremely slow. Up to 8 second compile plus another 3 or 4 seconds for livereload to show the change in chrome.

At least with the older versions in my previous comment the change showed in the browser in 1-2 seconds.

So does this mean the problem can be narrowed down to wdm? If that was fixed so wdm could be re-installed would it speed up guard? Sorry I don't know much about how it all works.

@thibaudgg
Guard member

@isimmons yes with wdm working it would be pretty fast and low cpu, polling adapter is using without wdm and it's quite slow.

@andregriffin

Confirming same problem with guard 2.2.3, listen 2.2.0, wdm 0.1.0, ruby 1.9.3 -- silent exit

@thibaudgg
Guard member

Still an issue?

@zetas
zetas commented Feb 25, 2014

I just started using spork and guard and found this issue when my guard process was just exiting instead of continuing to watch for changes, so barring some config issue on my part, this is still an issue.

This is my gemfile:

source 'https://rubygems.org'
ruby '1.9.3'

gem 'rails', '4.0.3'
gem 'pg'

group :development, :test do
  gem 'rspec-rails', '2.13.1'
  gem 'guard-rspec', '2.5.0'
  gem 'spork-rails', '4.0.0'
  gem 'guard-spork', '1.5.0'
  gem 'childprocess', '0.5.1'
end

group :test do
  gem 'selenium-webdriver', '2.35.1'
  gem 'capybara', '2.1.0'
  gem 'rb-notifu', '0.0.4'
  gem 'win32console', '1.3.2'
  gem 'wdm', '0.1.0'
end

gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'

group :doc do
  gem 'sdoc', '0.3.20', require: false
end

group :production do
  gem 'rails_12factor', '0.0.2'
end

This is the output from rubymine when i run guard:

C:\Ruby193\bin\ruby.exe -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) C:/Ruby193/bin/guard
08:54:30 - INFO - Guard is using Notifu to send notifications.
08:54:30 - INFO - Guard is using TerminalTitle to send notifications.
08:54:30 - INFO - Guard::RSpec is running
08:54:30 - INFO - Running all specs
...........

Finished in 0.18202 seconds
11 examples, 0 failures

Randomized with seed 53171

  <-- Slave(2) run done!
08:54:33 - INFO - Guard is now watching at 'C:/Users/David/RubymineProjects/sample_app'

Process finished with exit code -2147483647

and my guardfile which i've simplified to eliminate variables:

# A sample Guardfile
# More info at https://github.com/guard/guard#readme
require 'active_support/inflector'

group :spec do
  guard :rspec, all_after_pass: false, cli: '--drb' do
    watch(%r{^spec/.+_spec\.rb$})
    watch(%r{^lib/(.+)\.rb$})     { |m| "spec/lib/#{m[1]}_spec.rb" }
    watch('spec/spec_helper.rb')  { "spec" }
  end
end

This is my first day with guard and spork so I'm more than willing to admit it's a config issue on my part. I set this up while following the tutorial here: http://ruby.railstutorial.org/chapters/static-pages#sec-guard

@thibaudgg
Guard member

@zetas I'm sorry but I've never use Spork and Guard on Windows, never see the error either.

@zetas
zetas commented Feb 25, 2014

I need to get a frickin mac

@thibaudgg
Guard member

@zetas that sounds like a great idea. And use Spring instead of Spork!

@net1957
net1957 commented Apr 29, 2014

Get the same result as @nilliams on
windows 8.1 64b
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

If i use the example given in wdm repo (https://github.com/Maher4Ever/wdm/blob/master/example/changes_monitor.rb), it work.

see gist https://gist.github.com/net1957/7947e78ce2b6bb13b113

Using timers 1.1.0
Using celluloid 0.15.2
Using nio4r 1.0.0
Using celluloid-io 0.15.0
Using ffi 1.9.3
Using rb-fsevent 0.9.4
Using rb-inotify 0.9.4
Using listen 2.7.3
Using wdm 0.1.0
Using bundler 1.6.2
@thibaudgg
Guard member

@net1957 could you try to run the spec suite of Listen on your system and copy/paste the result here. Thanks!

@sparxsys
sparxsys commented May 1, 2014

I am using windows 8.1 and in my case everything is working fine when I use --force-polling option but it is very slow. Takes 4-5 mins to refresh the browser.

It works fine on my iMac but I really need to get it working on my windows laptop.

@net1957
net1957 commented May 1, 2014
D:\Dvlt\ruby\projects\_test>git clone https://github.com/guard/listen.git
Cloning into 'listen'...
remote: Counting objects: 4308, done.
remote: Compressing objects: 100% (2174/2174), done.
remote: Total 4308 (delta 2024), reused 4300 (delta 2021)
Receiving objects: 100% (4308/4308), 888.19 KiB | 139.00 KiB/s, done.
Resolving deltas: 100% (2024/2024), done.
Checking connectivity... done.

D:\Dvlt\ruby\projects\_test>pik list
  171: jruby 1.7.12 (1.9.3p392) 2014-04-15 643e292 on Java HotSpot(TM) 64-Bit Server VM 1.7.0_07-b10 [Windows 8-amd64]
* 193: ruby 1.9.3p545 (2014-02-24) [i386-mingw32]
  200: ruby 2.0.0p451 (2014-02-24) [x64-mingw32]

D:\Dvlt\ruby\projects\_test>cd listen

D:\Dvlt\ruby\projects\_test\listen>bundle
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and
installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.3.1
Using bundler 1.6.2
Using timers 1.1.0
Using celluloid 0.15.2
Using nio4r 1.0.0
Using celluloid-io 0.15.0
Installing coderay 1.1.0
Using multi_json 1.9.3
Using mime-types 2.2
Using rest-client 1.6.7
Using docile 1.1.3
Using simplecov-html 0.8.0
Using simplecov 0.8.2
Installing tins 1.1.0
Installing term-ansicolor 1.3.0
Using thor 0.19.1
Installing coveralls 0.7.0
Installing diff-lcs 1.2.5
Using ffi 1.9.3
Installing formatador 0.2.4
Using rb-fsevent 0.9.4
Using rb-inotify 0.9.4
Using listen 2.7.3 from source at .
Installing lumberjack 1.0.5
Installing method_source 0.8.2
Using slop 3.5.0
Installing win32console 1.3.2
Installing pry 0.9.12.6
Installing guard 2.6.0
Installing rspec-core 2.14.8
Installing rspec-expectations 2.14.5
Installing rspec-mocks 2.14.6
Installing rspec 2.14.1
Installing guard-rspec 4.2.8
Installing rspec-retry 0.3.0
Using wdm 0.1.0
Using yard 0.8.7.4
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

D:\Dvlt\ruby\projects\_test\listen>rake spec
D:/program/dvlt/ruby/ruby193/bin/ruby.exe -S rspec ./spec/acceptance/listen_spec.rb ./spec/acceptance/tcp_spec.rb ./spec
/lib/listen/adapter/base_spec.rb ./spec/lib/listen/adapter/bsd_spec.rb ./spec/lib/listen/adapter/darwin_spec.rb ./spec/l
ib/listen/adapter/linux_spec.rb ./spec/lib/listen/adapter/polling_spec.rb ./spec/lib/listen/adapter/tcp_spec.rb ./spec/l
ib/listen/adapter/windows_spec.rb ./spec/lib/listen/adapter_spec.rb ./spec/lib/listen/change_spec.rb ./spec/lib/listen/d
irectory_spec.rb ./spec/lib/listen/file_spec.rb ./spec/lib/listen/listener_spec.rb ./spec/lib/listen/record_spec.rb ./sp
ec/lib/listen/silencer_spec.rb ./spec/lib/listen/tcp/broadcaster_spec.rb ./spec/lib/listen/tcp/listener_spec.rb ./spec/l
ib/listen/tcp/message_spec.rb ./spec/lib/listen_spec.rb
You must use ANSICON 1.31 or later (http://adoxa.3eeweb.com/ansicon/) to use colour on Windows
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Listen::TCP::Listener
  when recipient
←[32m    should be a recipient←[0m
←[32m    should not be a broadcaster←[0m
←[32m    forces TCP adapter through options←[0m
    when host is omitted
      host
←[32m        should eq "localhost"←[0m
  when broadcaster
←[32m    does not force TCP adapter through options←[0m
←[32m    should not be a recipient←[0m
←[32m    should be a broadcaster←[0m
    #block
←[32m      broadcasts changes asynchronously←[0m
←[32m      invokes original callback block←[0m
      when paused
←[32m        honours paused state and does nothing←[0m
      when stopped
←[32m        honours stopped state and does nothing←[0m
    #start
←[32m      registers broadcaster←[0m
←[32m      starts broadcaster←[0m
    when host is omitted
      host
←[32m        should be nil←[0m
  #initialize
←[32m    raises on invalid mode←[0m
←[32m    raises on omitted target←[0m
    port
←[32m      should eq 4000←[0m
    host
←[32m      should eq "10.0.0.2"←[0m
    mode
←[32m      should equal :recipient←[0m

Listen
  with one listen dir
    force_polling option to true
      hidden file in listen dir
←[32m        listens to file touch←[0m
      with only option
←[32m        listens only to file touch matching with only patterns←[0m
      nothing in listen dir
←[32m        listens to file moved inside←[0m
←[32m        listens to multiple files addition←[0m
←[32m        listens to file addition←[0m
      dir in listen dir
←[32m        listens to file touch←[0m
      file in listen dir
←[31m        listens to file modification and wait (FAILED - 1)←[0m

Failures:

  1) Listen with one listen dir force_polling option to true file in listen dir listens to file modification and wait
     ←[31mFailure/Error:←[0m ←[31m}).to eq({ modified: ['file.rb'], added: [], removed: [] })←[0m
       ←[31m←[0m
       ←[31mexpected: {:modified=>["file.rb"], :added=>[], :removed=>[]}←[0m
       ←[31m     got: {:modified=>[], :added=>[], :removed=>[]}←[0m
       ←[31m←[0m
       ←[31m(compared using ==)←[0m
       ←[31m←[0m
       ←[31mDiff:←[0m
       ←[31m←[34m@@ -1,4 +1,4 @@←[0m
       ←[31m←[0m :added => [],←[0m
       ←[31m←[31m-:modified => ["file.rb"],←[0m
       ←[31m←[0m←[32m+:modified => [],←[0m
       ←[31m←[0m :removed => []←[0m
←[36m     # ./spec/acceptance/listen_spec.rb:77:in `block (6 levels) in <top (required)>'←[0m
←[36m     # ./spec/acceptance/listen_spec.rb:59:in `block (6 levels) in <top (required)>'←[0m
←[36m     # ./spec/acceptance/listen_spec.rb:20:in `block (4 levels) in <top (required)>'←[0m
←[36m     # ./spec/support/fixtures_helper.rb:23:in `fixtures'←[0m
←[36m     # ./spec/acceptance/listen_spec.rb:20:in `block (3 levels) in <top (required)>'←[0m

Finished in 8.05 seconds
←[31m26 examples, 1 failure←[0m

Failed examples:

←[31mrspec ./spec/acceptance/listen_spec.rb:73←[0m ←[36m# Listen with one listen dir force_polling option to true file i
n listen dir listens to file modification and wait←[0m

Randomized with seed 53461

D:/program/dvlt/ruby/ruby193/bin/ruby.exe -S rspec ./spec/acceptance/listen_spec.rb ./spec/acceptance/tcp_spec.rb ./spec
/lib/listen/adapter/base_spec.rb ./spec/lib/listen/adapter/bsd_spec.rb ./spec/lib/listen/adapter/darwin_spec.rb ./spec/l
ib/listen/adapter/linux_spec.rb ./spec/lib/listen/adapter/polling_spec.rb ./spec/lib/listen/adapter/tcp_spec.rb ./spec/l
ib/listen/adapter/windows_spec.rb ./spec/lib/listen/adapter_spec.rb ./spec/lib/listen/change_spec.rb ./spec/lib/listen/d
irectory_spec.rb ./spec/lib/listen/file_spec.rb ./spec/lib/listen/listener_spec.rb ./spec/lib/listen/record_spec.rb ./sp
ec/lib/listen/silencer_spec.rb ./spec/lib/listen/tcp/broadcaster_spec.rb ./spec/lib/listen/tcp/listener_spec.rb ./spec/l
ib/listen/tcp/message_spec.rb ./spec/lib/listen_spec.rb failed

D:\Dvlt\ruby\projects\_test\listen>

To run it on windows I removed the first "/" in Pathname in silencer_spec.rb

    directories: [Pathname.new(Dir.pwd), Pathname.new("Users/Shared/")],

without that I get this error

E, [2014-05-01T10:19:37.342856 #6408] ERROR -- : Listen::Silencer crashed!
ArgumentError: different prefix: "D:/" and "/Users/Shared"
        D:/program/dvlt/ruby/ruby193/lib/ruby/1.9.1/pathname.rb:465:in `relative_path_from'
        D:/Dvlt/ruby/projects/_test/listen/lib/listen/silencer.rb:60:in `block in _relative_path'
        D:/Dvlt/ruby/projects/_test/listen/lib/listen/silencer.rb:60:in `map'
        .....
@radimklaska

I've used
gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin/i
instead of
gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
(running bundle exec guard in standard windows command line) and it doesn't silently exits any more...

@andregriffin

I can confirm that using the standard command prompt instead of git bash and using the wdm config as stated above works. Using a completely updated bundle. Listen still throws a warning though about adding wdm config to my gemfile.

@e2
e2 commented May 15, 2014

Are there still issues getting wdm working with listen on Windows? (Using Listen v2.7.5 after gem update listen and bundle update listen ?)

If so, what does:

ruby -rrbconfig -e "p RbConfig::CONFIG.values_at('host_os', 'target_os')"

show?

Or, if nothing is being watched or listen silently exits, does running after setting the environment variable LISTEN_GEM_DEBUGGING=1 show anything?

Expected:

  • you should not see any warnings about polling - regardless of shell used in Windows (if you have 'wdm' in your Gemfile and installed)
  • listen should respond to changes quickly and every time
@net1957
net1957 commented May 15, 2014

Same problem

D:\Dvlt\ruby\projects\_tmp\listen>ruby -rrbconfig -e "p RbConfig::CONFIG.values_at('host_os', 'target_os')"
["mingw32", "mingw32"]

I have updated my gist https://gist.github.com/net1957/7947e78ce2b6bb13b113

@andregriffin

It seems wdm is working, as the response to changes seems to happen quickly, however, there is a warning about polling since I'm using:

gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin/i

Also, I had to manually add wdm to my lockfile, because it seems it was not picked up from my gemfile due to the change above.

@net1957
net1957 commented May 15, 2014

#andregriffin,

so your os is not mswin.
see #e2 comment

@e2
e2 commented May 15, 2014

Thanks @andregriffin and @net1957 !

The os detection in the README was improved at some point, so people may have to manually fix their Gemfiles to what's currently recommended:

require 'rbconfig'
gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i

Of course, removing the os check completely to:

gem 'wdm'

should work - and even if you share that Gemfile with people who don't use Windows, it shouldn't matter (the check is there to avoid irritating people who don't want extra dependencies in their projects).

Otherwise, I'm glad it works.

@net1957
net1957 commented May 16, 2014

@e2 Good news, but for me it's not working. Look at https://gist.github.com/net1957/7947e78ce2b6bb13b113

@e2
e2 commented May 17, 2014

@net1957 - could you run it (just the Listen) after setting the environment variable:
LISTEN_GEM_DEBUGGING=1 ?

(I'm suspecting Celluloid is capturing crashes and not reporting them because of the loglevel).

Debugging can also be enabled with:

Listen.to('D:/Dvlt/ruby/projects/_tmp/listen/list', debug: true) 
@e2
e2 commented May 17, 2014

And just in case - reset the default ignores (I doubt it's the cause, but ...):

Listen.to('D:/Dvlt/ruby/projects/_tmp/listen/list', debug: true, ignore!: /foobar/) 
@net1957
net1957 commented May 17, 2014

@e2 Debugging is already set to 1
And I see no change with your 2 last advices.
I have updated the gist https://gist.github.com/net1957/7947e78ce2b6bb13b113

@e2
e2 commented May 17, 2014

Thanks, @net1957 for the feedback!

I've created a branch to debug and nail this.
Could you run it with this branch in your Gemfile:

gem 'listen', github: 'guard/listen', branch: 'wmd_debugging'

And run it with either debug: 2 or LISTEN_GEM_DEBUGGING=2 ?

(Listen is likely crashing somewhere and this should at least hint where).

Anyway, I hope these debug will help nail the issue.

If not, could you rerun the latest tests using master or this debugging branch?

Because the error you had earlier (when running specs - the ArgumentError) was supposed to have been fixed since and the actual tests can fail sometimes (due to race conditions - that's why rspec/retry is used when running from Travis).

Also, the spec that failed for you was a polling spec, not a wdm one (although if it something is wrong with the path handling - both test types would fail).

Oh, and since recent commits, you should be able to override rspec options when running tests with the following .rspec-local file:

--no-color
--seed 12345
--backtrace
--no-failfast

(So you can paste traces without ANSI codes and so the same tests fail - not at random, etc.)

Thanks so much for all the effort you put into reporting this! I appreciate it so much (just looking at the gists you made answers so many questions about what is not the cause...).

I'm guessing the path handling is failing on your setup - and it's somewhere deeper in Listen (I'm rewriting parts of it to avoid this in the future - but I do want to have a stable release of Listen working problem, so I want to work this out).

Thanks again!

@net1957
net1957 commented May 17, 2014

@e2, Thanks for the reply.

In using the new branch , it fail.
see gist https://gist.github.com/net1957/89afa5fe17c1f0bc4378

Testing the gem give (branch wmd_debugging):

D:\Dvlt\ruby\projects\_test\listen>bundle exec rspec
You must use ANSICON 1.31 or later (http://adoxa.3eeweb.com/ansicon/) to use colour on Windows
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Listen::Adapter::Base
  #_latency
    returns default_latency with listener actor latency not present
    returns latency from listener actor if present
  #_notify_change
    listener listen
      calls change on change_pool asynchronously
    listener doesn't listen
      calls change on change_pool asynchronously

Listen::Adapter::TCP
  should not be local fs
  #handle_message
    notifies listener of path changes
  #run
    handles data from socket
  .usable?
    always returns true
  #handle_data
    buffers data
    handles messages accordingly
  #start
    invokes run loop
    initializes and exposes a string buffer
    initializes and exposes a socket with listener host and port
  #finalize
    clears buffer
    closes socket

Listen
  with one listen dir
    force_polling option to true
      ignored dir with file in listen dir
        doesn't listen to file touch
      with only option
        listens only to file touch matching with only patterns
      hidden file in listen dir
        listens to file touch
      nothing in listen dir
        listens to file moved inside
        listens to multiple files addition
        listens to file addition
      default ignored dir with file in listen dir
        doesn't listen to file touch
      dir in listen dir
        listens to file touch
      two dirs with files in listen dir
        listens to multiple file moves
        listens to dir move
      file in listen dir
        listens to file echo (FAILED - 1)

Failures:

  1) Listen with one listen dir force_polling option to true file in listen dir listens to file echo
     Failure/Error: end).to eq(modified: ['file.rb'], added: [], removed: [])

       expected: {:modified=>["file.rb"], :added=>[], :removed=>[]}
            got: {:modified=>[], :added=>[], :removed=>[]}

       (compared using ==)

       Diff:
       @@ -1,4 +1,4 @@
        :added => [],
       -:modified => ["file.rb"],
       +:modified => [],
        :removed => []
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.14.5/lib/rspec/expectations/fail_with.rb:32:in `fail_with'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.14.5/lib/rspec/expectations/handler.rb:34:in `handle_matcher'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-expectations-2.14.5/lib/rspec/expectations/expectation_target.rb:34:in `to'
     # ./spec/acceptance/listen_spec.rb:96:in `block (6 levels) in <top (required)>'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in `instance_eval'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:114:in `block in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:179:in `call'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:179:in `run'
     # ./spec/acceptance/listen_spec.rb:71:in `block (6 levels) in <top (required)>'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:247:in `instance_eval_with_args'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:179:in `call'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:179:in `run'
     # ./spec/acceptance/listen_spec.rb:25:in `block (4 levels) in <top (required)>'
     # ./spec/support/fixtures_helper.rb:18:in `fixtures'
     # ./spec/acceptance/listen_spec.rb:25:in `block (3 levels) in <top (required)>'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:247:in `instance_eval_with_args'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:179:in `call'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:179:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-retry-0.3.0/lib/rspec/retry.rb:36:in `block (3 levels) in apply'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-retry-0.3.0/lib/rspec/retry.rb:27:in `times'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-retry-0.3.0/lib/rspec/retry.rb:27:in `block (2 levels) in apply'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_exec'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/extensions/instance_eval_with_args.rb:16:in `instance_eval_with_args'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:247:in `instance_eval_with_args'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:106:in `block (2 levels) in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:104:in `call'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:104:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/hooks.rb:446:in `run_hook'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:340:in `run_around_each_hooks'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:256:in `with_around_each_hooks'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example.rb:111:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:390:in `block in run_examples'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in `map'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:386:in `run_examples'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:371:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `block in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `map'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `block in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `map'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `block in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `map'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/example_group.rb:372:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `block (2 levels) in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `map'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:28:in `block in run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/reporter.rb:58:in `report'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/command_line.rb:25:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:80:in `run'
     # D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.8/lib/rspec/core/runner.rb:17:in `block in autorun'

Finished in 11.88 seconds
26 examples, 1 failure

Failed examples:

rspec ./spec/acceptance/listen_spec.rb:93 # Listen with one listen dir force_polling option to true file in listen dir listens to file echo

Randomized with seed 12345


D:\Dvlt\ruby\projects\_test\listen>

in my case rspec didn't like '--no-failfast' in .rspec-local file

@andregriffin

Just to double check, it's "wdm" not "wmd"

And @net1957, yes I'm on win 8.1 x64.

Removing the os check from the wdm gem require, I get a silent exit even in windows command prompt now (even with the change @radimklaska suggested). With the change to the os check, wdm gets removed from my lock file every time now (it worked a few days ago... strange).

@e2
e2 commented May 18, 2014

@net1957 - thanks, I added more debugs (maybe it's the adapter selection that's crashing?).

I renamed the branch, now it's: wdm_debugging (sorry about the confusion). (thanks, @azt3k
andregriffin )

@andregriffin - that suggestion is what removes wdm from the Gemfile. In fact, you could just use gem 'wdm' without the check, because you want to make sure wdm is included and working.

BTW, what's in that listened folder, @net1957 ? Is it empty? How are you testing modifications?

In case the above new debugs don't show anything, try listening to a different folder, like c:\test, or something. Or, if you can, run the tests for celluloid (github: celluloid/celluloid) - they should work perfectly on your Windows/Ruby/Devkit combination.

If you can, try using the ruby installer (for 1.9.3 or 2.0) + devkit on a fresh Windows XP (etc.) virtual machine (has to work). You could also try the master branch of celluloid (gem 'celluloid', github: 'celluloid') with listen - in case celluloid has been patched in the meantime (the current 0.15.2 release of Celluloid is quite old).

Because if the above branch doesn't help find the problem ... this might be tough to track down, unless you try working out what's wrong yourself (putting in debugs, catching exceptions, dumping them on screen, then raising them again).

Sorry, I'm just having a tough time wondering what could not be working and how to find out what.

@net1957
net1957 commented May 18, 2014

@e2
I double checked and the gem is 'wdm'

the listened folder was empty.

I tried various folder with and without files inside without success.

D:\Dvlt\ruby\projects\_tmp\listen>ruby code.rb
I, [2014-05-18T11:12:10.640907 #10832]  INFO -- : Celluloid loglevel set to: 0
env: LISTEN_GEM_DEBUGGING=2
Listen: Running the monitor...
Adapter: considering TCP ...
Adapter: considering polling ...
Adapter: considering optimized backend...
I, [2014-05-18T11:12:10.656531 #10832]  INFO -- : got change: [#<Pathname:C:/xxx>, {:type=>"Dir", :recursive=>true, :sil
ence=>true}]
I, [2014-05-18T11:12:10.656531 #10832]  INFO -- : got change: [#<Pathname:C:/xxx/x.rb.rb>, {:type=>"File", :recursive=>t
rue, :silence=>true}]
Listen: Started...
W, [2014-05-18T11:12:10.656531 #10832]  WARN -- : wdm - starting...

D:\Dvlt\ruby\projects\_tmp\listen>

I used a XP VM with same ruby version and it's working.

D:\Users\Serge\Mesdocuments\NetBeansProjects\_tmp\listen>ruby code.rb
I, [2014-05-18T15:43:36.034933 #2832]  INFO -- : Celluloid loglevel set to: 0
env: LISTEN_GEM_DEBUGGING=
Listen: Running the monitor...
Adapter: considering TCP ...
Adapter: considering polling ...
Adapter: considering optimized backend...
I, [2014-05-18T15:43:36.034933 #2832]  INFO -- : got change: [#<Pathname:D:/User
s/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list>, {:type=>"Dir", :recursi
ve=>true, :silence=>true}]
I, [2014-05-18T15:43:36.034933 #2832]  INFO -- : got change: [#<Pathname:D:/User
s/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb>, {:type=>"File",
 :recursive=>true, :silence=>true}]
Listen: Started...
W, [2014-05-18T15:43:36.044948 #2832]  WARN -- : wdm - starting...
W, [2014-05-18T15:43:36.044948 #2832]  WARN -- : wdm - running worker ...
I, [2014-05-18T15:43:55.022804 #2832]  INFO -- : got change: [#<Pathname:D:/User
s/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb>, {:type=>"File",
 :change=>:modified}]
I, [2014-05-18T15:43:55.032819 #2832]  INFO -- : got change: [#<Pathname:D:/User
s/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb>, {:type=>"File",
 :change=>:modified}]
I, [2014-05-18T15:43:55.042834 #2832]  INFO -- : got change: [#<Pathname:D:/User
s/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb>, {:type=>"File",
 :change=>:modified}]
I, [2014-05-18T15:43:55.042834 #2832]  INFO -- : got change: [#<Pathname:D:/User
s/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb>, {:type=>"File",
 :change=>:modified}]
I, [2014-05-18T15:43:55.173025 #2832]  INFO -- : listen: raw changes: [[:modifie
d, "D:/Users/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb"]]
I, [2014-05-18T15:43:55.173025 #2832]  INFO -- : listen: final changes: {:modifi
ed=>["D:/Users/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb"], :
added=>[], :removed=>[]}
modified absolute path: ["D:/Users/Serge/Mesdocuments/NetBeansProjects/_tmp/list
en/list/code.rb"]
I, [2014-05-18T15:44:10.415163 #2832]  INFO -- : got change: [#<Pathname:D:/User
s/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb>, {:type=>"File",
 :change=>:removed}]
I, [2014-05-18T15:44:10.595422 #2832]  INFO -- : listen: raw changes: [[:removed
, "D:/Users/Serge/Mesdocuments/NetBeansProjects/_tmp/listen/list/code.rb"]]
I, [2014-05-18T15:44:10.595422 #2832]  INFO -- : listen: final changes: {:modifi
ed=>[], :added=>[], :removed=>["D:/Users/Serge/Mesdocuments/NetBeansProjects/_tm
p/listen/list/code.rb"]}
removed absolute path: ["D:/Users/Serge/Mesdocuments/NetBeansProjects/_tmp/liste
n/list/code.rb"]
D, [2014-05-18T15:44:36.052027 #2832] DEBUG -- : Terminating 7 actors...
W, [2014-05-18T15:44:36.052027 #2832]  WARN -- : Terminating task: type=:finaliz
er, meta={:method_name=>:__shutdown__}, status=:callwait

D:\Users\Serge\Mesdocuments\NetBeansProjects\_tmp\listen>

in this latest case the Gemfile.lock is:

IT
  remote: git://github.com/guard/listen.git
  revision: f49811c1844d1ced2fe43a5c1a63650d22960ebf
  branch: wdm_debugging
  specs:
    listen (2.7.5)
      celluloid (>= 0.15.2)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)

GEM
  remote: https://rubygems.org/
  specs:
    celluloid (0.15.2)
      timers (~> 1.1.0)
    ffi (1.9.3-x86-mingw32)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.4)
      ffi (>= 0.5.0)
    timers (1.1.0)
    wdm (0.1.0)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  listen!
  wdm (>= 0.1.0)

On my 8.1 x64 windows, I use a ruby x32.
What seems strange is that I have another application that use same ruby and celluloid and it work correctly. And "wdm" alone work.

I have tried with the master branch of celluloid without success :

env: LISTEN_GEM_DEBUGGING=2
I, [2014-05-18T16:01:20.219438 #8952]  INFO -- : Celluloid loglevel set to: 0
Listen: Running the monitor...
Adapter: considering TCP ...
Adapter: considering polling ...
Adapter: considering optimized backend...
I, [2014-05-18T16:01:20.238723 #8952]  INFO -- : got change: [#<Pathname:C:/xxx>, {:type=>"Dir", :recursive=>true, :silence=>true}]
I, [2014-05-18T16:01:20.240725 #8952]  INFO -- : got change: [#<Pathname:C:/xxx/x.rb.rb>, {:type=>"File", :recursive=>true, :silence=>true}]
W, [2014-05-18T16:01:20.241725 #8952]  WARN -- : wdm - starting...
GIT
  remote: git://github.com/celluloid/celluloid.git
  revision: 9cedd3990db9ec5a026a10d62df6d3106d631c77
  specs:
    celluloid (0.16.0.pre)
      timers (~> 2.0.0)

GIT
  remote: git://github.com/guard/listen.git
  revision: f49811c1844d1ced2fe43a5c1a63650d22960ebf
  branch: wdm_debugging
  specs:
    listen (2.7.5)
      celluloid (>= 0.15.2)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)

GEM
  remote: https://rubygems.org/
  specs:
    ffi (1.9.3)
    ffi (1.9.3-x86-mingw32)
    hitimes (1.2.1)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.4)
      ffi (>= 0.5.0)
    timers (2.0.0)
      hitimes
    wdm (0.1.0)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  celluloid!
  listen!
  wdm (>= 0.1.0)

No more idea at this time !!

@e2
e2 commented May 18, 2014

@net1957 - I have a few more ideas what could be wrong. I'll check them out later...

@net1957
net1957 commented May 18, 2014

@e2
I tried ruby 2.0.0-p451 x64 ant it work

I, [2014-05-18T18:17:02.105016 #5368]  INFO -- : Celluloid loglevel set to: 0
env: LISTEN_GEM_DEBUGGING=2
Listen: Running the monitor...
Listen: Started...
Adapter: considering TCP ...
Adapter: considering polling ...
Adapter: considering optimized backend...
I, [2014-05-18T18:17:02.121732 #5368]  INFO -- : got change: [#<Pathname:C:/xxx>, {:type=>"Dir", :recursive=>true, :silence=>true}]
I, [2014-05-18T18:17:02.122733 #5368]  INFO -- : got change: [#<Pathname:C:/xxx/x.rb.rb>, {:type=>"File", :recursive=>true, :silence=>true}]
W, [2014-05-18T18:17:02.122733 #5368]  WARN -- : wdm - starting...
W, [2014-05-18T18:17:02.123733 #5368]  WARN -- : wdm - running worker ...
I, [2014-05-18T18:17:19.440322 #5368]  INFO -- : got change: [#<Pathname:C:/xxx/x.rb.rb>, {:type=>"File", :change=>:removed}]
I, [2014-05-18T18:17:19.640457 #5368]  INFO -- : listen: raw changes: [[:removed, "C:/xxx/x.rb.rb"]]
removed absolute path: ["C:/xxx/x.rb.rb"]
I, [2014-05-18T18:17:19.641457 #5368]  INFO -- : listen: final changes: {:modified=>[], :added=>[], :removed=>["C:/xxx/x.rb.rb"]}
I, [2014-05-18T18:17:27.122167 #5368]  INFO -- : got change: [#<Pathname:C:/xxx/x.rb.rb>, {:type=>"File", :change=>:added}]
added absolute path: ["C:/xxx/x.rb.rb"]
I, [2014-05-18T18:17:27.286315 #5368]  INFO -- : listen: raw changes: [[:added, "C:/xxx/x.rb.rb"]]
I, [2014-05-18T18:17:27.286315 #5368]  INFO -- : listen: final changes: {:modified=>[], :added=>["C:/xxx/x.rb.rb"], :removed=>[]}

Gemfile.lock

GIT
  remote: git://github.com/celluloid/celluloid.git
  revision: 9cedd3990db9ec5a026a10d62df6d3106d631c77
  specs:
    celluloid (0.16.0.pre)
      timers (~> 2.0.0)

GIT
  remote: git://github.com/guard/listen.git
  revision: f49811c1844d1ced2fe43a5c1a63650d22960ebf
  branch: wdm_debugging
  specs:
    listen (2.7.5)
      celluloid (>= 0.15.2)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)

GEM
  remote: https://rubygems.org/
  specs:
    ffi (1.9.3-x64-mingw32)
    hitimes (1.2.1)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.4)
      ffi (>= 0.5.0)
    timers (2.0.0)
      hitimes
    wdm (0.1.0)

PLATFORMS
  x64-mingw32

DEPENDENCIES
  celluloid!
  listen!
  wdm (>= 0.1.0)

if I use standard gems it's also working

env: LISTEN_GEM_DEBUGGING=2
Listen: Running the monitor...
Listen: Started...
I, [2014-05-18T18:21:21.391619 #8208]  INFO -- : listen: raw changes: [[:removed, "C:/xxx/x.rb.rb"]]
removed absolute path: ["C:/xxx/x.rb.rb"]
I, [2014-05-18T18:21:21.392619 #8208]  INFO -- : listen: final changes: {:modified=>[], :added=>[], :removed=>["C:/xxx/x.rb.rb"]}
added absolute path: ["C:/xxx/x.rb.rb"]
I, [2014-05-18T18:21:26.626831 #8208]  INFO -- : listen: raw changes: [[:added, "C:/xxx/x.rb.rb"]]
I, [2014-05-18T18:21:26.626831 #8208]  INFO -- : listen: final changes: {:modified=>[], :added=>["C:/xxx/x.rb.rb"], :removed=>[]}

Gemfile.lock

GEM
  remote: https://rubygems.org/
  specs:
    celluloid (0.15.2)
      timers (~> 1.1.0)
    ffi (1.9.3-x64-mingw32)
    listen (2.7.5)
      celluloid (>= 0.15.2)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.4)
      ffi (>= 0.5.0)
    timers (1.1.0)
    wdm (0.1.0)

PLATFORMS
  x64-mingw32

DEPENDENCIES
  celluloid
  listen
  wdm (>= 0.1.0)

So it's possibly a problem with x32 ruby on a x64 system ?
Cheers

@e2
e2 commented May 18, 2014

Thanks for the info.

To be sure, you could run the Celluloid specs on both (neither should fail).

You could also run standard Ruby unit tests (e.g. after compiling Ruby from source) - if there are any errors there, there might be known bugs at a deeper level (threads, fibers).

Overall, Windows seems to be a "work in progress" in terms of support for Ruby. Even the TCP functionality won't run without more recent commits in celluloid-io.

Personally, I'd stay away from development in Windows - especially related to Ruby or the web, because it's almost never worth the headaches. For me it's a miracle Ruby even runs on Windows...

@e2
e2 commented May 19, 2014

@net1957, could you check the current, updated wdm_debugging branch?

(It includes more debugs and some fixes).

Also, the following should work fine:
bundle exec rspec spec/acceptance/listener_spec.rb

[ If tests fail, try running them again - in case there's a timing error].

If the tests don't run properly, paste the errors (after setting LISTEN_GEM_DEBUGGING=2).

@net1957
net1957 commented May 19, 2014

@e2

ok it's bundle exec rspec spec/acceptance/listen_spec.rb
and the bundle command fail on kernel.warn
I modified it to

source 'https://rubygems.org'

gemspec

require 'rbconfig'

case RbConfig::CONFIG['target_os']

when /mswin|mingw|cygwin/i
  gem 'wdm', '>= 0.1.0'
else
  # handled by gemspec
end

group :tool do
  gem 'yard', require: false
  gem 'guard-rspec', require: false
  gem 'guard-rubocop'
end

group :test do
  gem 'coveralls', require: false
end

after that the result is:

Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Listen
  with one listen dir
    force_polling option to true
      ignored dir with file in listen dir

but i got lot of errors

I, [2014-05-19T22:12:15.785535 #3084]  INFO -- : Celluloid loglevel set to: 0
W, [2014-05-19T22:12:15.785535 #3084]  WARN -- : Dangerously suspending task: type=:call, meta={:method_name=>:initialize}, status=:callwait
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid.rb:200:in `new_link'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `block in initialize'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `times'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `each'
W, [2014-05-19T22:12:15.785535 #3084]  WARN -- : Dangerously suspending task: type=:call, meta={:method_name=>:initialize}, status=:callwait
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid.rb:200:in `new_link'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `block in initialize'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `times'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `each'
W, [2014-05-19T22:12:15.793350 #3084]  WARN -- : Dangerously suspending task: type=:call, meta={:method_name=>:initialize}, status=:callwait
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid.rb:200:in `new_link'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `block in initialize'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `times'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `each'
W, [2014-05-19T22:12:15.793350 #3084]  WARN -- : Dangerously suspending task: type=:call, meta={:method_name=>:initialize}, status=:callwait
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid.rb:200:in `new_link'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `block in initialize'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `times'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `each'
W, [2014-05-19T22:12:15.793350 #3084]  WARN -- : Dangerously suspending task: type=:call, meta={:method_name=>:initialize}, status=:callwait
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid.rb:200:in `new_link'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `block in initialize'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `times'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `each'
W, [2014-05-19T22:12:15.797255 #3084]  WARN -- : Dangerously suspending task: type=:call, meta={:method_name=>:initialize}, status=:callwait
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid.rb:200:in `new_link'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `block in initialize'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `times'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `each'
W, [2014-05-19T22:12:15.797255 #3084]  WARN -- : Dangerously suspending task: type=:call, meta={:method_name=>:initialize}, status=:callwait
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid.rb:200:in `new_link'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `block in initialize'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `times'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `each'
W, [2014-05-19T22:12:15.797255 #3084]  WARN -- : Dangerously suspending task: type=:call, meta={:method_name=>:initialize}, status=:callwait
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/calls.rb:92:in `value'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/sync_proxy.rb:33:in `method_missing'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/proxies/actor_proxy.rb:20:in `_send_'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid.rb:200:in `new_link'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `block in initialize'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `times'
        D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/celluloid-0.15.2/lib/celluloid/pool_manager.rb:19:in `each'
D, [2014-05-19T22:12:15.801162 #3084] DEBUG -- : Adapter: considering TCP ...
D, [2014-05-19T22:12:15.801162 #3084] DEBUG -- : Adapter: considering polling ...
I, [2014-05-19T22:12:15.801162 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765>, {:type=>"Dir", :recursive=>true,
:silence=>true}]
I, [2014-05-19T22:12:15.805067 #3084]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765"
D, [2014-05-19T22:12:15.805067 #3084] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x26248e0>
I, [2014-05-19T22:12:15.805067 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>, {:type=>"Dir", :recur
sive=>true, :silence=>true}]
I, [2014-05-19T22:12:15.808973 #3084]  INFO -- : (silenced): #<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>
I, [2014-05-19T22:12:15.808973 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765>, {:type=>"Dir", :recursive=>true}]

I, [2014-05-19T22:12:15.808973 #3084]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765"
D, [2014-05-19T22:12:15.808973 #3084] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x2918bc8>
I, [2014-05-19T22:12:15.808973 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>, {:type=>"Dir", :recur
sive=>true}]
I, [2014-05-19T22:12:15.808973 #3084]  INFO -- : (silenced): #<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>
I, [2014-05-19T22:12:15.910540 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765>, {:type=>"Dir", :recursive=>true}]

I, [2014-05-19T22:12:15.910540 #3084]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765"
D, [2014-05-19T22:12:15.910540 #3084] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x2a77538>
I, [2014-05-19T22:12:15.910540 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>, {:type=>"Dir", :recur
sive=>true}]
I, [2014-05-19T22:12:15.910540 #3084]  INFO -- : (silenced): #<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>
I, [2014-05-19T22:12:16.012109 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765>, {:type=>"Dir", :recursive=>true}]

I, [2014-05-19T22:12:16.012109 #3084]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765"
D, [2014-05-19T22:12:16.012109 #3084] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x2a9e448>
I, [2014-05-19T22:12:16.012109 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>, {:type=>"Dir", :recur
sive=>true}]
I, [2014-05-19T22:12:16.012109 #3084]  INFO -- : (silenced): #<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>
I, [2014-05-19T22:12:16.113676 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765>, {:type=>"Dir", :recursive=>true}]

I, [2014-05-19T22:12:16.113676 #3084]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765"
D, [2014-05-19T22:12:16.113676 #3084] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x2aa2dc8>
I, [2014-05-19T22:12:16.113676 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>, {:type=>"Dir", :recur
sive=>true}]
I, [2014-05-19T22:12:16.113676 #3084]  INFO -- : (silenced): #<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>
I, [2014-05-19T22:12:16.215244 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765>, {:type=>"Dir", :recursive=>true}]

I, [2014-05-19T22:12:16.215244 #3084]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765"
D, [2014-05-19T22:12:16.215244 #3084] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x341c040>
I, [2014-05-19T22:12:16.215244 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>, {:type=>"Dir", :recur
sive=>true}]
I, [2014-05-19T22:12:16.215244 #3084]  INFO -- : (silenced): #<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>
I, [2014-05-19T22:12:16.316811 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765>, {:type=>"Dir", :recursive=>true}]

I, [2014-05-19T22:12:16.316811 #3084]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765"
D, [2014-05-19T22:12:16.316811 #3084] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x342d368>
I, [2014-05-19T22:12:16.316811 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>, {:type=>"Dir", :recur
sive=>true}]
I, [2014-05-19T22:12:16.316811 #3084]  INFO -- : (silenced): #<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>
I, [2014-05-19T22:12:16.418377 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765>, {:type=>"Dir", :recursive=>true}]

I, [2014-05-19T22:12:16.418377 #3084]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765"
D, [2014-05-19T22:12:16.418377 #3084] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x3442a40>
I, [2014-05-19T22:12:16.418377 #3084]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/140053033577772282765/ignored_dir>, {:type=>"Dir", :recur
sive=>true}]

And so on until the end. For each fixture you have the sequence of lots of "dangerously suspending" and lots of "Discarded message"

the end is

D, [2014-05-19T22:20:32.621731 #3532] DEBUG -- : Adapter: considering polling ...
D, [2014-05-19T22:20:32.621731 #3532] DEBUG -- : Adapter: considering optimized backend...
I, [2014-05-19T22:20:32.641264 #3532]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/1400530832567047925>, {:type=>"Dir", :recursive=>true, :s
ilence=>true}]
I, [2014-05-19T22:20:32.641264 #3532]  INFO -- : - - - - - scanning: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/1400530832567047925"
D, [2014-05-19T22:20:32.641264 #3532] DEBUG -- : Discarded message (unhandled): #<Celluloid::Future::Result:0x2468748>
I, [2014-05-19T22:20:32.641264 #3532]  INFO -- : got change: [#<Pathname:D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/1400530832567047925/ignored_dir>, {:type=>"Dir", :recursi
ve=>true, :silence=>true}]
W, [2014-05-19T22:20:32.649075 #3532]  WARN -- : wdm - starting...
I, [2014-05-19T22:20:32.649075 #3532]  INFO -- : wdm - watching recursively: "D:/Dvlt/ruby/projects/_test/listen/spec/.fixtures/1400530832567047925"

D:\Dvlt\ruby\projects\_test\listen>
@e2
e2 commented May 19, 2014

Actually, those are just warnings ("Dangerously suspending" and "Discarded message") I can't much about - they're both harmless.

I was looking for things like "actor crashed" or Celluloid "ERROR" logs.

Did the tests succeed or crash somewhere? (I can't see). And there should be more tests there.

Could you use the bundle exec rspec spec/acceptance/listen_spec.rb -o outputfile.log command? (And upload that file somewhere, etc.)?

Oh, and the Kernel.warn is just output text to the screen - has no effect on whether bundler succeeds or not.

@net1957
net1957 commented May 19, 2014

@e2
for the Kernel.warn

`D:\Dvlt\ruby\projects\_test\listen>bundle exec rspec spec/acceptance/listen_spec.rb
D:/Dvlt/ruby/projects/_test/listen/Gemfile:11:in `warn': wrong number of arguments(4 for 1) (ArgumentError)
       D:/Dvlt/ruby/projects/_test/listen/Gemfile:11:in `eval_gemfile'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/dsl.rb:36:in `instance_eval'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/dsl.rb:36:in `eval_gemfile'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/dsl.rb:10:in `evaluate'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/definition.rb:26:in `build'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler.rb:153:in `definition'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/cli/exec.rb:11:in `run'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/cli.rb:252:in `exec'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/vendor/thor/command.rb:27:in `run'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/vendor/thor.rb:363:in `dispatch'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/vendor/thor/base.rb:440:in `start'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/cli.rb:9:in `start'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/bin/bundle:20:in `block in <top (required)>'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
       D:/program/dvlt/ruby/ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.6.2/bin/bundle:20:in `<top (required)>'
       D:/program/dvlt/ruby/ruby193/bin/bundle:23:in `load'
       D:/program/dvlt/ruby/ruby193/bin/bundle:23:in `<main>'
There was an error in your Gemfile, and Bundler cannot continue.

D:\Dvlt\ruby\projects\_test\listen>
@net1957
net1957 commented May 19, 2014

@e2

cmd bundle exec rspec spec/acceptance/listen_spec.rb -o outputfile.log >r.txt 2>&1 result on
https://gist.github.com/net1957/c23888915212d6372489

@net1957
net1957 commented May 21, 2014

@e2
I tried your latest master branch abcd3e

D:\Dvlt\ruby\projects\_test\listen>bundle exec rspec spec/acceptance/listen_spec.rb
Run options: include {:focus=>true}

All examples were filtered out; ignoring {:focus=>true}

Listen
  with one listen dir
    force_polling option to true
      with default ignore options
        hidden file in listen dir
          should detect modification of ".hidden"
        with .bundle dir ignored by default
          should not detect addition of ".bundle/file.rb"
        dir in listen dir
          should detect addition of "dir/file.rb"
        with nothing in listen dir
          listens to multiple files addition
          should detect addition of "file.rb"
          listens to file moved inside
          should detect addition of ".hidden"
        two dirs with files in listen dir
          listens to multiple file moves
          listens to dir move
        dir with file in listen dir
          listens to file move
        existing file.rb in listen dir
          listens to file.rb modification and wait
          should detect modification of "file.rb"
          listens to file.rb moved out
          listens to file mode change
          should detect removal of "file.rb"
      when :ignore is *ignored_dir*
        when :ignore is bar.rb
          when :only is *.rb
            should not detect addition of "bar.rb"
            should detect addition of "file.rb"
            should not detect addition of "file.txt"
        ignored dir with file in listen dir
          should not detect addition of "ignored_dir/file.rb"
        when default ignore is *.rb
          should not detect addition of "file.rb"
          with #ignore on *.txt mask
            should not detect addition of "file.rb"
            should not detect addition of "file.txt"
          with #ignore! on *.txt mask
            should detect addition of "file.rb"
            should not detect addition of "file.txt"
        when :only is *.rb
          should detect addition of "file.rb"
          should not detect addition of "file.txt"
    with change block raising
      warns the backtrace
    force_polling option to false
      with default ignore options
        hidden file in listen dir
          should detect modification of ".hidden"
        with .bundle dir ignored by default

D:\Dvlt\ruby\projects\_test\listen>ruby -v
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

but kernel.warn fail with Gemfile:11:in `warn': wrong number of arguments(4 for 1) (ArgumentError)
Replacing , by \ solve the issue before bundle and the previous rspec run

but my test application fail

env: LISTEN_GEM_DEBUGGING=2
Listen: Running the monitor...
I, [2014-05-21T22:25:25.000853 #5172]  INFO -- : Celluloid loglevel set to: 0
D, [2014-05-21T22:25:25.007455 #5172] DEBUG -- : Adapter: considering TCP ...
D, [2014-05-21T22:25:25.007455 #5172] DEBUG -- : Adapter: considering polling ...
D, [2014-05-21T22:25:25.007455 #5172] DEBUG -- : Adapter: considering optimized backend...
D, [2014-05-21T22:25:25.012522 #5172] DEBUG -- : got change: [#<Pathname:C:/xxx>, {:type=>"Dir", :recursive=>true, :silence=>true}]
D, [2014-05-21T22:25:25.013524 #5172] DEBUG -- : Scanning: "C:/xxx"
Listen: Started...W, [2014-05-21T22:25:25.014526 #5172]  WARN -- : wdm - starting...
D, [2014-05-21T22:25:25.014526 #5172] DEBUG -- : wdm - watching recursively: "C:/xxx"
@e2
e2 commented May 22, 2014

Thanks for all the updates, @net1957
I've fixed the Kernel.warn problem and I've fixed the WDM debugging.

The additional debugs should at least show if the thread is started or not.

You may also want to enable debugging in WDM: https://github.com/Maher4Ever/wdm#compiling-the-extension-for-developers

If nothing shows up, this will have to wait until I rework all the adapters (soon enough) for the upcoming new API.

@net1957
net1957 commented May 23, 2014

After some tries (I hit ConnorAtherton/rb-readline#98), I got wdm compiled with debugging on and get:

D:\Dvlt\ruby\projects\_tmp\listen>ruby code.rb
[DEBUG] (../../../../ext/wdm/wdm.c@37): Registering WDM with Ruby!
[DEBUG] (../../../../ext/wdm/rb_monitor.c@546): Registering WDM::Monitor with Ruby!
[DEBUG] (../../../../ext/wdm/rb_change.c@185): Registering WDM::Event with Ruby!
I, [2014-05-23T22:45:09.005733 #3444]  INFO -- : Celluloid loglevel set to: 0
env: LISTEN_GEM_DEBUGGING=2
Listen: Running the monitor...
D, [2014-05-23T22:45:09.013544 #3444] DEBUG -- : Adapter: considering TCP ...
D, [2014-05-23T22:45:09.013544 #3444] DEBUG -- : Adapter: considering polling ...
D, [2014-05-23T22:45:09.013544 #3444] DEBUG -- : Adapter: considering optimized backend...
D, [2014-05-23T22:45:09.017451 #3444] DEBUG -- : got change: [#<Pathname:C:/xxx>, {:type=>"Dir", :recursive=>true, :silence=>true}]
D, [2014-05-23T22:45:09.017451 #3444] DEBUG -- : Scanning: "C:/xxx"
D, [2014-05-23T22:45:09.021357 #3444] DEBUG -- : got change: [#<Pathname:C:/xxx/bootmenu.xml>, {:type=>"File", :recursive=>true, :silence=>true}]
Listen: Started...
D, [2014-05-23T22:45:09.021357 #3444] DEBUG -- : wdm - starting...
[DEBUG] (../../../../ext/wdm/rb_monitor.c@105): --------------------------------
[DEBUG] (../../../../ext/wdm/rb_monitor.c@106): Allocating a new monitor object!
[DEBUG] (../../../../ext/wdm/rb_monitor.c@107): --------------------------------
D, [2014-05-23T22:45:09.033076 #3444] DEBUG -- : wdm - watching recursively: "C:/xxx"
[DEBUG] (../../../../ext/wdm/rb_monitor.c@199): New path to watch: 'C:/xxx'

D:\Dvlt\ruby\projects\_tmp\listen>
@e2
e2 commented May 23, 2014

Looks like it's getting to rb_monitor.c line 199, but it's not getting to line 240, so it looks like a WDM issue (it should say "Watching directory: " after "New path to watch".

You might want to compile it with debug info and attach a debugger to find out what's happening (maybe it's crashing). Or maybe it's incorrectly complied (binary mismatch with installed Ruby).

There's also a chance it's crashing somewhere in Celluloid. Maybe setting the Celluloid task_class to threads would help. I'm doing some rewrites, so if I find any possible "holes" that could help find the problem, I'll let you know.

Also, in the listener.rb file, there's a line you can try commenting out: registry[:record].build (in the unpause method).

Also, in base.rb, you might want to try changing:

def _notify_change(path, options)
  sleep 0.01 until listener.registry[:change_pool]
  listener.registry[:change_pool].async.change(path, options) if listener.listen?
end

to:

def _notify_change(path, options)
  unless listener.listen?
    Celluloid::Logger.warning "Listener not listening for changes anymore"
    return
  end

  pool = listener.registry[:change_pool]
  unless pool
    Celluloid::Logger.error "Failed to allocate change"
    return
  end

  pool.async.change(path, options)

rescue
  Celluloid::Logger.error "Failed to notify change: #{$!}:\n#{$@.join("\n")}"
  raise
end

(Not tested - I typed that by hand based on other upcoming improvements)

@net1957
net1957 commented May 23, 2014

@e2
it fail badly in entry->user_data->dir = wdm_utils_full_pathname(entry->user_data->dir);
but adding debugging in this function don't help ! it's seems to break during calling this function

I'm not very good on C so I can't help much more on this side.

It's strange that wdm is running alone but not within listen.

No changes with base.rb and listener.rb modified

@net1957 net1957 referenced this issue in Maher4Ever/wdm May 23, 2014
Open

fail with listen gem #15

@net1957
net1957 commented May 24, 2014

@e2
see last result after adding debug lines in wdm utils.c
https://gist.github.com/net1957/3c82f1d6afe4a4eea05b

Changing directory to relative or absolute path don't change the result

@net1957
net1957 commented Jun 2, 2014

@e2,

with the latest 2.7.6 version it seems to do the job. Nice work!

I, [2014-06-02T22:06:26.072471 #8552]  INFO -- : Celluloid loglevel set to: 0
env: LISTEN_GEM_DEBUGGING=2
Listen: Running the monitor...
D, [2014-06-02T22:06:26.079925 #8552] DEBUG -- : Adapter: considering TCP ...
D, [2014-06-02T22:06:26.079925 #8552] DEBUG -- : Adapter: considering polling ...
D, [2014-06-02T22:06:26.079925 #8552] DEBUG -- : Adapter: considering optimized backend...
D, [2014-06-02T22:06:26.080926 #8552] DEBUG -- : recording: dir:D:/Dvlt/ruby/projects/_tmp/listen/xxx ({:recursive=>true, :silence=>true, :build=>true})
D, [2014-06-02T22:06:26.081926 #8552] DEBUG -- : Recording: D:/Dvlt/ruby/projects/_tmp/listen/xxx: {:recursive=>true, :silence=>true, :build=>true} [{}] -> (#<Set: {#<Pathname:D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb>}>)
D, [2014-06-02T22:06:26.081926 #8552] DEBUG -- : recording: file:D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb ({:silence=>true, :build=>true})
D, [2014-06-02T22:06:26.183169 #8552] DEBUG -- : wdm - starting...
Listen: Started...
D, [2014-06-02T22:06:34.834128 #8552] DEBUG -- : wdm - ATTR callback: #<WDM::Change:0x293cb68 @type=:modified, @path="D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb">
D, [2014-06-02T22:06:34.834128 #8552] DEBUG -- : wdm - ATTR callback: #<WDM::Change:0x2942af0 @type=:modified, @path="D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb">
D, [2014-06-02T22:06:34.835129 #8552] DEBUG -- : wdm - ATTR callback: #<WDM::Change:0x2940378 @type=:modified, @path="D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb">
D, [2014-06-02T22:06:34.836173 #8552] DEBUG -- : modified: file:D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb ({:change=>:modified})
D, [2014-06-02T22:06:34.836173 #8552] DEBUG -- : modified: file:D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb ({:change=>:modified})
D, [2014-06-02T22:06:34.836173 #8552] DEBUG -- : modified: file:D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb ({:change=>:modified})
I, [2014-06-02T22:06:34.936241 #8552]  INFO -- : listen: raw changes: [[:modified, "D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb"]]
I, [2014-06-02T22:06:34.937241 #8552]  INFO -- : listen: final changes: {:modified=>["D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb"], :added=>[], :removed=>[]}
modified absolute path: ["D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb"]
D, [2014-06-02T22:06:39.277257 #8552] DEBUG -- : wdm - FILE callback: #<WDM::Change:0x3596e68 @type=:removed, @path="D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb">
D, [2014-06-02T22:06:39.277257 #8552] DEBUG -- : removed: file:D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb ({:change=>:removed})
removed absolute path: ["D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb"]
I, [2014-06-02T22:06:39.377484 #8552]  INFO -- : listen: raw changes: [[:removed, "D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb"]]
I, [2014-06-02T22:06:39.377484 #8552]  INFO -- : listen: final changes: {:modified=>[], :added=>[], :removed=>["D:/Dvlt/ruby/projects/_tmp/listen/xxx/code.rb"]}
D, [2014-06-02T22:06:46.183429 #8552] DEBUG -- : Terminating 13 actors...
W, [2014-06-02T22:06:46.184463 #8552]  WARN -- : Terminating task: type=:finalizer, meta={:method_name=>:__shutdown__}, status=:callwait

GEM
  remote: https://rubygems.org/
  specs:
    celluloid (0.15.2)
      timers (~> 1.1.0)
    ffi (1.9.3-x86-mingw32)
    listen (2.7.6)
      celluloid (>= 0.15.2)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.4)
      ffi (>= 0.5.0)
    timers (1.1.0)
    wdm (0.1.0)

PLATFORMS
  x86-mingw32

DEPENDENCIES
  celluloid
  listen (= 2.7.6)
  wdm

@andregriffin

I can confirm this also works for me.

It did not work when my gemfile was using, as used to be required:

gem 'wdm', '>= 0.1.0' if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i

But just using, the following, it works:

gem 'wdm', '>= 0.1.0'

Fantastic work. Thank you.

@e2
e2 commented Jun 3, 2014

Thanks guys! And thanks for your help, too.

Let me know if you have other issues - even minor edge cases.

@andregriffin - that's strange.

Are you absolutely sure you're using bundler 1.6.2?
Does bundle say 'Using wdm 0.1.0' after running bundle install or not?
Have you tried removing the Gemfile.lock and bundle install?
Does bundle show wdm say anything? (with the RbConfig condition)
Does something like: gem 'wdm', '>= 0.1.0' if true work?

Could you try putting this into your Gemfile:

result = RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i

if result
  STDERR.puts "wdm loading on: #{RbConfig::CONFIG['target_os']} (#{result.inspect})"
  gem 'wdm', '>= 0.1.0' 
else
  STDERR.puts "wdm not loading on: #{RbConfig::CONFIG['target_os']} (#{result.inspect})"
end

I just can't imagine how this can not work.

@andregriffin

I am using bundler 1.6.2.

Using gem 'wdm', '>= 0.1.0' if true works

bundle show wdm produces this:

wdm loading on: mingw32 (0)
c:/Ruby193/lib/ruby/gems/1.9.1/gems/wdm-0.1.0

Pasting what you gave into my gemfile produces this:

wdm loading on: mingw32 (0)
wdm loading on: mingw32 (0)
wdm loading on: mingw32 (0)
20:29:09 - INFO - Reloading browser: css/site.no-query.css
20:29:11 - INFO - Reloading browser: css/site.styles.css
20:29:12 - INFO - Reloading browser: css/layouts/centered/centered.layout.no-que
ry.css
[1] guard(main)> Compilation took 6.115s
20:29:13 - INFO - Reloading browser: css/layouts/centered/centered.layout.css
[1] guard(main)> Monitoring theme files.
20:29:14 - INFO - Guard::Compass is waiting to compile your stylesheets.
20:29:14 - INFO - Guard is now watching at 'LOCALPATH'
20:29:14 - INFO - LiveReload is waiting for a browser to connect.

Just fails after LiveReload tries to connect, as it has always done...

@e2
e2 commented Jun 3, 2014

@andregriffin, could you set the environment variable set LISTEN_GEM_DEBUGGING=2 and then rerun guard with the debug option, e.g. bundle exec guard -d ?

It's strange if LiveReload fails because of a config check in the Gemfile - definitely seems like an unrelated issue...

@parkr
parkr commented Jun 11, 2014

We use Listen to handle file changes in Jekyll and are running into serious problems with Listen on Windows.

An array of issues, even up to v2.7.7. Seems like 2.6.0 worked ok, 2.7.5 is broken, 2.7.6 works for some, and 2.7.7 breaks everything. Is this Listen or WDM's problem?

@e2
e2 commented Jun 11, 2014

@parkr - as far as I know, everything should work. Let's tackle this one by one - pick an issue (most serious first is ok) and run with LISTEN_GEM_DEBUGGING=1 (and if it doesn't show anything, run it with 2).

Also, Listen hijacks Celluloid's logger (because it's async, etc.) and Celluloid can either show irrelevant errors or silence them and show nothing, so:

  1. Run with the debug flag above
  2. Check if the behavior is as expected - if not, let me know.
  3. Don't freak out with the amount of Celluloid errors - most of them are probably harmless.

Running with the debug flag set should help me quickly identify the cause.

@e2
e2 commented Jun 11, 2014

Overall, Windows is a poor platform for development, while the WDM is a great job and there's no active support for Windows in Listen (should work, though it's not actively tested and none of the core devs uses Windows, there's no build options for Windows on Travis, etc.).

The current released version is expected to work - and I wouldn't consider any other version. If it doesn't work, it's a bug and I don't know about it.

@parkr
parkr commented Jun 11, 2014

@e2 Thanks for getting back to me so quickly! Didn't know LISTEN_GEM_DEBUGGING was a thing. What are the values? I'll ask everyone to submit a stacktrace with that env var turned on. It's only on Windows that we're seeing problems and I don't have a windows computer so I can't test for them. Thanks for the tip and thanks for looking through the issues I posted.

@e2
e2 commented Jun 12, 2014

@parkr - it's described in the (long) README. 1 should be enough to show problems and events, 2 is full debug (probably not necessary).

Even if the problem isn't with Listen, it's useful for debugging everything else too - and especially for extracting fixtures and test/edge cases.

Listen does a ton of complex stuff under the hood, each platform has little in common with the others (in terms of how it works, possible bugs and problems) and there a tons of possible edge-cases and race-conditions that aren't prevented or don't even have defined proper behavior...

... so don't hesitate to ask about anything.

@parkr
parkr commented Jun 12, 2014

@e2 Seem to be running into a problem with #_log:

I, [2014-06-13T01:30:36.861327 #5968]  INFO -- : Celluloid loglevel set to: 1
W, [2014-06-13T01:30:36.883328 #5968]  WARN -- : Adapter: failed: #<NoMethodErro
r: undefined method `_log' for Listen::Adapter::Windows:Class>:C:/Ruby200-x64/li
b/ruby/gems/2.0.0/gems/listen-2.7.7/lib/listen/adapter/windows.rb:21:in `rescue
in usable?'
C:/Ruby200-x64/lib/ruby/gems/2.0.0/gems/listen-2.7.7/lib/listen/adapter/windows.
rb:17:in `usable?'

It's been reported twice today. Here's a stacktrace with the debugging env var turned on: jekyll/jekyll#2507 (comment)

@e2
e2 commented Jun 12, 2014

Looks like I didn't implement _log as a class method... doh...

Either way, it's reporting that for some reason WDM failed to get required - either the wdm gem isn't installed, or it didn't get built/compiled (the Windows version of the gem should have a working compiled binary AFAIK).

@e2
e2 commented Jun 12, 2014

@parkr - v2.7.8 fixes this (it shows warning and falls back to polling instead of crashing)

@parkr
parkr commented Jun 12, 2014

@parkr - v2.7.8 fixes this (it shows warning and falls back to polling instead of crashing)

Excellent! Thanks a lot.

@Ollie222

@e2 - I believe that I'm experiencing the same or similar issue so any help would be appreciated.

I'm running Drupal and the Omega theme which uses ruby and sass/compass to process the css files and update the browser.

The issues are when running on a windows development stack

Win 7 64bit
ruby 1.9.3p545 (2014-02-24) [i386-mingw32]

The gemfile is

source 'https://rubygems.org'

group :development do

# Sass, Compass and extensions.
gem 'sass' # Sass.
gem 'sass-globbing' # Import Sass files based on globbing pattern.
gem 'compass' # Framework built on Sass.
gem 'compass-validator' # So you can compass validate.
gem 'compass-normalize' # Compass version of normalize.css.
gem 'compass-rgbapng' # Turns rgba() into .png's for backwards compatibility.
gem 'susy' # Susy grid framework.
gem 'singularitygs' # Alternative to the Susy grid framework.
gem 'toolkit' # Compass utility from the fabulous Snugug.
gem 'breakpoint' # Manages CSS media queries.
gem 'oily_png' # Faster Compass sprite generation.
gem 'css_parser' # Helps compass stats output statistics.

# Guard
gem 'guard' # Guard event handler.
gem 'guard-compass' # Compile on sass/scss change.
gem 'guard-shell' # Run shell commands.
gem 'guard-livereload' # Browser reload.
gem 'yajl-ruby' # Faster JSON with LiveReload in the browser.

# Dependency to prevent polling. Setup for multiple OS environments.
# Optionally remove the lines not specific to your OS.
# https://github.com/guard/guard#efficient-filesystem-handling
gem 'rb-inotify', '~> 0.9', :require => false # Linux
gem 'rb-fsevent', :require => false # Mac OSX
gem 'rb-fchange', :require => false # Windows

require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
gem 'wdm', '>= 0.1.0'
end
end

The gemfile.lock is

GEM
remote: https://rubygems.org/
specs:
addressable (2.3.6)
breakpoint (2.5.0)
sass (~> 3.3)
sassy-maps (< 1.0.0)
celluloid (0.16.0)
timers (~> 4.0.0)
chunky_png (1.3.1)
coderay (1.1.0)
compass (1.0.1)
chunky_png (~> 1.2)
compass-core (~> 1.0.1)
compass-import-once (~> 1.0.5)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
sass (>= 3.3.13, < 3.5)
compass-core (1.0.1)
multi_json (~> 1.0)
sass (>= 3.3.0, < 3.5)
compass-import-once (1.0.5)
sass (>= 3.2, < 3.5)
compass-normalize (1.5)
compass (>= 0.12.0)
compass-rgbapng (0.2.1)
chunky_png (>= 0.8.0)
compass (>= 0.10.0)
compass-validator (3.0.1)
css_parser (1.3.5)
addressable
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.0.3-x86-mingw32)
ffi (1.9.3-x86-mingw32)
formatador (0.2.5)
guard (2.6.1)
formatador (>= 0.2.4)
listen (~> 2.7)
lumberjack (~> 1.0)
pry (>= 0.9.12)
thor (>= 0.18.1)
guard-compass (1.1.0)
compass (>= 0.10.5)
guard (~> 2.0)
guard-livereload (2.3.0)
em-websocket (~> 0.5)
guard (~> 2.0)
multi_json (~> 1.8)
guard-shell (0.6.1)
guard (>= 1.1.0)
hitimes (1.2.2)
http_parser.rb (0.6.0)
listen (2.7.9)
celluloid (>= 0.15.2)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
method_source (0.8.2)
multi_json (1.10.1)
oily_png (1.1.1)
chunky_png (~> 1.3.0)
pry (0.10.1-x86-mingw32)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
win32console (~> 1.3)
rb-fchange (0.0.6)
ffi
rb-fsevent (0.9.4)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
sass (3.4.3)
sass-globbing (1.1.1)
sass (>= 3.1)
sassy-maps (0.4.0)
sass (~> 3.3)
singularitygs (1.4.0)
breakpoint (~> 2.4)
sass (~> 3.3)
slop (3.6.0)
susy (2.1.3)
sass (>= 3.3.0, < 3.5)
thor (0.19.1)
timers (4.0.1)
hitimes
toolkit (2.6.0)
sass (~> 3.3)
wdm (0.1.0)
win32console (1.3.2-x86-mingw32)
yajl-ruby (1.2.1)

PLATFORMS
x86-mingw32

DEPENDENCIES
breakpoint
compass
compass-normalize
compass-rgbapng
compass-validator
css_parser
guard
guard-compass
guard-livereload
guard-shell
oily_png
rb-fchange
rb-fsevent
rb-inotify (~> 0.9)
sass
sass-globbing
singularitygs
susy
toolkit
wdm (>= 0.1.0)
yajl-ruby

If I call 'bundle exec guard --force-polling'

Changes are detected and everything works however it runs the CPU's virtual core are 100% even though there is less than 100 files for it to check.

If I call 'bundle exec guard' it just silently exits after it says it's monitoring the files.

If I set the environment variable LISTEN_GEM_DEBUGGING=1 then it returns

16:10:21 - INFO - Guard::Compass is waiting to compile your stylesheets.
16:10:21 - INFO - Guard is now watching at 'C:/drupal_project'
16:10:21 - INFO - LiveReload is waiting for a browser to connect.
I, [2014-09-12T16:10:21.858138 #8992] INFO -- : Record.build took 0.07100415229797363 seconds

With LISTEN_GEM_DEBUGGING=2 I get

I, [2014-09-12T16:19:39.227017 #6116] INFO -- : Celluloid loglevel set to: 0

16:19:49 - INFO - Guard::Compass is waiting to compile your stylesheets.
16:19:49 - INFO - Guard is now watching at 'C:/drupal_project'
16:19:49 - INFO - LiveReload is waiting for a browser to connect.
D, [2014-09-12T16:19:49.155585 #6116] DEBUG -- : Adapter: considering TCP ...
D, [2014-09-12T16:19:49.155585 #6116] DEBUG -- : Adapter: considering polling ...
D, [2014-09-12T16:19:49.156585 #6116] DEBUG -- : Adapter: considering optimized backend...
I, [2014-09-12T16:19:49.244590 #6116] INFO -- : Record.build took 0.07000398635864258 seconds
D, [2014-09-12T16:19:49.246590 #6116] DEBUG -- : wdm - starting...

Very occasionally it does work without force polling but it's very rare but I can't find any pattern to replicate when it works. When it does work the CPU usage is neglible.

I'm new to Ruby so if you have any ideas or advice (ideally other than don't use windows :)) it would be gratefully received.

@Ollie222

After some further experimentation it seems that I may have found a pattern for my setup.

In my gemfile if I comment out the line gem 'wdm' line' like this

require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
#gem 'wdm', '>= 0.1.0'
end

and then start it with bundle exec guard it starts as mentioned before and works ok.

If after it starts I then type 'exit', uncomment the gem 'wdm' line like this

require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /mswin|mingw|cygwin/i
gem 'wdm', '>= 0.1.0'
end

and then start it again with bundle exec guard it now works and it looks to be using wdm, cpu usage is very low and any changes are detected much more quickly (3 seconds versus about 10).

If I exit this and try to restart it it silently exits at the start and this is regardless of how many times I try to restart it. The only thing that makes it work is to again comment out the gem 'wdm' line, start and exit it, uncomment it and then start it again.

Hopefully this extra info may provide some extra clues.

One other thing I note is that the livereload is unreliable if I have more than one browser window to the same dev site open at the same time.

@e2
e2 commented Sep 14, 2014

@Ollie222 - listen comes with a "listen" tool to just print files that change - without running guard, etc.

Just run listen and change some files - should run forever and report all changes without issues. And if that doesn't work, try e.g. on an empty folder and create a file there.

Because at this point, you want to know if the problem is with listen or guard.

(After 'wdm - starting ...' you should see 'wdm - callback: (...)' whenever you change a watched file).

Once listen is working perfectly by itself, we can work out what else could be wrong...

@Ollie222

@e2 - Thank you for the quick response.

This is my first exposure to Ruby so I'm still learning a lot of the basics.

If I just type listen at the command prompt then it just says 'Starting listen...' and then exists. I'm not sure if this is intended behaviour or not.

In a new folder I've just added a gemfile with the following contents and called 'bundle install'.

source 'https://rubygems.org'
gem 'listen' # Guard event handler.
gem 'celluloid-io'

I've then created a file called test.rb and added the script below to it.

require 'listen'
path = 'C:\ruby-files'
puts path
listener = Listen.to(path) do |modified, added, removed|
puts "modified absolute path: #{modified}"
puts "added absolute path: #{added}"
puts "removed absolute path: #{removed}"
end
listener.start # not blocking
sleep

When I run the above script it outputs the path name and then just sits there. If I add, delete or alter any files in the monitored directory then the file detail changes are shown in the terminal.

If I have more than 58 files in the directory being monitored then the script starts and exits after a few seconds.

Is there a memory setting that needs to be increased or does this provide any more clues as to what to test next?

Thanks again for your help.

@e2
e2 commented Sep 15, 2014

@Ollie222 - if your scripts stops after a few seconds, it means something silently crashed.

Just set the environment variable: set LISTEN_GEM_DEBUGGING=2 before running your script, and it should display errors and crashes. (And paste the output).

@Ollie222

Thanks again for your quick reply.

With LISTEN_GEM_DEBUGGING=2 it gives the following output before exiting.

I, [2014-09-15T15:12:05.946292 #11712] INFO -- : Celluloid loglevel set to: 0
D, [2014-09-15T15:12:05.968293 #11712] DEBUG -- : Adapter: considering TCP ...
D, [2014-09-15T15:12:05.969293 #11712] DEBUG -- : Adapter: considering polling ...
D, [2014-09-15T15:12:05.971294 #11712] DEBUG -- : Adapter: considering optimized backend...
I, [2014-09-15T15:12:06.082300 #11712] INFO -- : Record.build took 0.03300213813781738 seconds
D, [2014-09-15T15:12:06.084300 #11712] DEBUG -- : wdm - starting...

It looks like it's starting wdm even though I've not got it specified in the gem file.

With debugging on if I now have 53 or fewer items in the directory then it works with wdm, any more and it exits silently.

If I change the listen.to to include force_polling:true then with debugging mode on it lists the file names in the specified directories every second or so and it looks to work with any number of files although it took about 30 seconds to check a folder with 22,000 files in it which I presume is to be expected.
.

@e2
e2 commented Sep 15, 2014

@Ollie222 - any strange names in the files?

Other than that I have no clue at this point. You could try a newer version of Ruby maybe (to see if anything is different). Maybe even a 'bundle update' to make sure you have a newer version of Celluloid.

You can try adding more debug statements in the adapters/windows.rb file - to see when it exits.

Either way, your problem seems strange (you should at least see errors or something).

When you have more than 53 files - does it exit even if you do nothing (i.e. no files changed)?

@Ollie222

I'm currently using 1.9.3 as this is what seems to be suggested as the most compatible but I'll try a later version of Ruby.

Bundle update shows

Fetching gem metadata from https://rubygems.org/...........
Resolving dependencies...
Using hitimes 1.2.2
Using timers 4.0.1
Using celluloid 0.16.0
Using nio4r 1.0.1
Using celluloid-io 0.16.0
Using ffi 1.9.3
Using rb-fsevent 0.9.4
Using rb-inotify 0.9.5
Using listen 2.7.9
Using rb-fchange 0.0.6
Using wdm 0.1.0
Using bundler 1.7.2
Your bundle is updated!

I believe the above is about as up to date as available for stable versions. (I've added back in wdm)

It either works perfectly with a smaller number of files or it just exits a second or so after starting before any file changes have taken place.

Am I right in thinking that adapters.rb is part of compass, if so I don't think my test project uses it.

I It certainly seems a bit of an odd issue and once again thanks for your time trying to help, I'll update the thread if I get anywhere.

@e2
e2 commented Sep 15, 2014

You can use bundle show listen to find out where Listen's files are and add debug logs to adapter/windows.rb like here: https://github.com/guard/listen/blob/master/lib/listen/adapter/windows.rb#L30

Basically, you'd want to know whether the _configure method finishes and if the _run method does too.

You could also try an earlier version of Listen (between 2.7.0 and master) - just to compare if it works any different (you won't see any debug messages - but you can check if it exits or not).

Anyway, without some serious poking around with the wdm adapter (windows.rb file above), I have no idea what could be wrong.

(afterwards, gem pristine listen should undo any change you make to listen's source files)

@Ollie222

Thanks for the advice.

I've added a couple of debug messages to the windows.rb file.

  def _configure(dir, &callback)
    require 'wdm'
    _log :debug, 'wdm - starting...'
    @worker ||= WDM::Monitor.new
    _log :debug, 'wdm - stage 1'
    @worker.watch_recursively(dir.to_s, :files) do |change|
      callback.call([:file, change])
    end
    _log :debug, 'wdm - stage 2'

    @worker.watch_recursively(dir.to_s, :directories) do |change|
      callback.call([:dir, change])
    end

    events = [:attributes, :last_write]
    @worker.watch_recursively(dir.to_s, *events) do |change|
      callback.call([:attr, change])
    end
  end

  def _run
    _log :debug, 'wdm - worker run'
    @worker.run!
  end

When executed I now get

wdm - starting...
wdm - stage 1

If I'm understanding correctly it's not calling and returning from watch_recursively which I believe is part of the wdm gem.

Also the directory and file names are simple and making them shorter makes no difference to the maximum number of files.

@e2
e2 commented Sep 23, 2014

@Ollie222 - this probably needs compiling a debug version of wdm and/or putting debug statements there.

Personally, I avoid Windows like the plague (and I have a grudge against Microsoft products), so it's unlikely I'll spend time helping you debug this on the wdm side. Of course, if there's anything I can fix in Listen itself (or provide a workaround), I'd be happy to.

The best thing I can recommend is trying out Ruby 2.1.2 (or other versions) to see if there's any change (there were some memory allocation issues - see current/close wdm issues for possible info/tips, e.g. Maher4Ever/wdm#15).

@Ollie222

@e2 - Thanks for your advice again and I wasn't expecting you to fix the issue, you've given me lots to go on and issue does look to be with wdm and Windows.

I have to use a number of different platforms for different projects but for this one getting it working on Windows would be useful.

I will try out a later version of Ruby and also checkout the wdm issues list. I'll report back if I get anywhere.

Once again thanks for your help.

@e2
e2 commented Sep 23, 2014

@Ollie222 - no problem. I hope I didn't come across as being irritated or something - I just have too many personal reasons not to get my hands dirty with this. While windows is a "user friendly" platform, it's also a very "developer-unfriendly" platform (IMHO).

I feel sad for Windows users that they have so many exotic issues - and I feel for the independent developers out there spending tons of time trying to deal with them (I used to be one of them - ages ago) and getting almost no credit and/or long-term satisfaction.

(I'm always astounded to see so many brilliant people doing incredible things to make Ruby apps and libraries work on Windows).

Just to make myself clear - I'd love to make listen work perfectly on Windows (and I've spent a lot of time to make it work and keep it working) and thumbs up for anyone willing to dive into this. It's just that by being a "Windows repair-man" I feel like I'm contributing to the problem instead of fixing it.

So while I don't want to get my hands dirty with this, I also don't want to discourage others from asking for help with similar issues and/or from making contributions in listen towards Windows support.

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.