WSL icon indicating copy to clipboard operation
WSL copied to clipboard

Jekyll unable to watch

Open davatron5000 opened this issue 10 years ago • 9 comments

A brief description

Jekyll is still unable to compile using jekyll serve. Previously, this was blocked by the INOTIFY (#216) errors.

Expected results

Jekyll#serve would detect file changes and recompile.

Actual results (with terminal output if applicable)

Jekyll#serve doesn't recompile. No errors.

Your Windows build number

14951

Steps / All commands required to reproduce the error from a brand new installation

Assumes Ruby 2.3+ and Jekyll 3.2+

jekyll new jekyll-reduced-test-case && cd jekyll-reduced-test-case
jekyll serve
  1. A webrick server is started at localhost:4000 and Jekyll is watching for changes.
  2. Change a file, like index.html

I made a reduced testcase, per @bitcrazed's suggestion on Twitter, but it's just these two commands. https://github.com/davatron5000/jekyll-reduced-test-case

Strace of the failing command

No error or stack trace is produced.

Required packages and commands to install

  • libruby2.3
  • gem install jekyll

See our contributing instructions for assistance.

davatron5000 avatar Oct 20 '16 16:10 davatron5000

@JasonLinMS to see if he has any ideas around here. @davatron5000 In step (2), how are you changing the file or what editor are you using?

sunilmut avatar Oct 31 '16 22:10 sunilmut

@sunilmut VS Code or Atom. Any editor that edits .html

davatron5000 avatar Oct 31 '16 22:10 davatron5000

@davatron5000 In what directory are the files you are modifying? /mnt/c/... or /home?

benhillis avatar Oct 31 '16 22:10 benhillis

@benhillis

/mnt/c/Users/FirstName\ LastName/Desktop/Jekyll-test/

davatron5000 avatar Oct 31 '16 23:10 davatron5000

@davatron5000 Thanks for reporting this issue, I can repro it and will start investigating.

JasonLinMS avatar Oct 31 '16 23:10 JasonLinMS

@davatron5000 We have tweaked the DrvFs code for inotify to resolve this issue. The fix should make it to the Insider build in a few weeks, thanks.

 Auto-regeneration: enabled for '/mnt/c/Users/Jason/Desktop/jekyll-reduced-test-case'
Configuration file: /mnt/c/Users/Jason/Desktop/jekyll-reduced-test-case/_config.yml
    Server address: http://127.0.0.1:4000/
  Server running... press ctrl-c to stop.
      Regenerating: 1 file(s) changed at 2016-11-07 18:29:53 ...done in 3.566026 seconds.
      Regenerating: 1 file(s) changed at 2016-11-07 18:30:00 ...done in 0.3030221 seconds.
      Regenerating: 1 file(s) changed at 2016-11-07 18:30:03 ...done in 0.2900834 seconds.

JasonLinMS avatar Nov 08 '16 02:11 JasonLinMS

This issue was fixed in Win10 Insider build 14942, and improved in subsequent builds.

Blog: https://blogs.msdn.microsoft.com/commandline/2016/10/07/wsl-adds-inotify-filesystem-change-notification-support/

bitcrazed avatar Jan 10 '17 20:01 bitcrazed

I am getting this same issue. Auto-regeneration not working with Jekyll on WSL2. On build 19041.264

It works fine if my site is in /home, but not /mnt/d/ or mnt/c/

It says that auto-regen is enabled but no changes detected or errors raised.

Tried with sublime and visual studio code. Using ruby 2.6.6, gems 2.6.0, jekyll 4.0.1

iansedano avatar May 17 '20 07:05 iansedano

@iansedano It's a known limitation of current WSL2 in /mnt folders. #4739

onomatopellan avatar May 17 '20 12:05 onomatopellan