Closed ashmaroli closed 6 years ago
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mingw32]
v3.1.5
Windows 7
Gemfile
gem "listen"
test_dir/listener.rb
require "listen" require "listen/version"
listener = Listen.to('test') do |modified, added, removed| puts Listen::VERSION puts "modified absolute path: #{modified}" puts "added absolute path: #{added}" puts "removed absolute path: #{removed}" end listener.start # not blocking sleep
- `test_dir/test/test.md` ### Test Run - run `listener`
$ cd test_dir $ bundle exec ruby listener.rb
- change `test_dir/test/test.md` - add `test_dir/test/test2.md`, `test_dir/test/test3.md` - delete `test_dir/test/test3.md` ### Outputs
Please add the following to your Gemfile to avoid polling for changes: gem 'wdm', '>= 0.1.0' if Gem.win_platform? 3.1.5 modified absolute path: ["~test/test.md"] added absolute path: [] removed absolute path: []
3.1.5 modified absolute path: [] added absolute path: ["~test/test2.md", "~test/test3.md"] removed absolute path: []
3.1.5 modified absolute path: [] added absolute path: [] removed absolute path: ["~test/test3.md"]
- `Gemfile.lock` :
GEM specs: ffi (1.9.14-x86-mingw32) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0) ruby_dep (1.5.0)
PLATFORMS x86-mingw32
DEPENDENCIES listen
BUNDLED WITH 1.13.6
I do not know about the gem's need on a Windows Subsystem on Linux or with Virtual Machines on Windows ...
Relevant Environment Details
ruby 2.3.1p112 (2016-04-26 revision 54768) [i386-mingw32]
v3.1.5
Windows 7
Inventory
Gemfile
test_dir/listener.rb
:listener = Listen.to('test') do |modified, added, removed| puts Listen::VERSION puts "modified absolute path: #{modified}" puts "added absolute path: #{added}" puts "removed absolute path: #{removed}" end listener.start # not blocking sleep
$ cd test_dir $ bundle exec ruby listener.rb
Please add the following to your Gemfile to avoid polling for changes: gem 'wdm', '>= 0.1.0' if Gem.win_platform? 3.1.5 modified absolute path: ["~test/test.md"] added absolute path: [] removed absolute path: []
3.1.5 modified absolute path: [] added absolute path: ["~test/test2.md", "~test/test3.md"] removed absolute path: []
3.1.5 modified absolute path: [] added absolute path: [] removed absolute path: ["~test/test3.md"]
GEM specs: ffi (1.9.14-x86-mingw32) listen (3.1.5) rb-fsevent (~> 0.9, >= 0.9.4) rb-inotify (~> 0.9, >= 0.9.7) ruby_dep (~> 1.2) rb-fsevent (0.9.8) rb-inotify (0.9.7) ffi (>= 0.5.0) ruby_dep (1.5.0)
PLATFORMS x86-mingw32
DEPENDENCIES listen
BUNDLED WITH 1.13.6