Maher4Ever / wdm

Windows Directory Monitor (WDM) is a threaded directories monitor for Windows.
https://rubygems.org/gems/wdm
MIT License
50 stars 14 forks source link

cygwin #12

Open gtype opened 11 years ago

gtype commented 11 years ago

Using cygwin I couldn't install wdm. To fix that first I had to change the encoding of rb_change.c (I THINK it was that file, can't be sure) to "UTF-8 without BOM". Then there were two functions that weren't recognized, I fixed it by adding "have_library("msvcrt") and" into extconf.rb. Another problem is that it doesn't accept cygwin directories. Can't help you there, since I just changed the listen gem to convert the directories. Other than that you will be glad to know that it works flawlessly. Hopefully when you have the time you can make it work out of the box.

Thank you

gregist commented 8 years ago

can confirm the solution, thanks @gtype!

to be a little more specific, the extconf.rb file should look like,

...
if windows? and
   have_library("msvcrt") and
   have_library("kernel32") and
   have_header("windows.h") and
   have_header("ruby.h")    and
...
gregist commented 8 years ago

@gtype I successfully installed wdm 0.1.1, but still got the Please add the following to your Gemfile to avoid polling for changes: gem 'wdm', '>= 0.1.0' if Gem.win_platform? warning. any ideas why?

The bash commands I ran was cd /cygdrive/d/[some-git-folder]; jekyll serve --watch. What did you mean by "it doesn't accept cygwin directories"? Is this problem relevant?

THanks.

dan-bryant commented 8 years ago

@gregist, as @gtype mentioned this will fix the install. You still get the message because 'wdm' is is not in your Gemfile. Problem is, even if you did put it in your Gemfile, you get past the install issue and into a runtime issue. Once installed you will get a new different error:

WDM is not supported on your system. For a cross-platform alternative,
we recommend using Listen: http://github.com/guard/listen

Don't know how to fix that.