Live reload issue solved when running Jekyll on Windows 10.

Used:

  • windows 10 version 2004 (OS Build 19041.1237)
  • ruby 2.6.5p114 (2019-10-01 revision 67812) [x64-mingw32]
  • jekyll 3.9.0

Issue

When attempting to use live reload on Windows 10 (bundle exec jekyll serve --livereload), encountered the following error,

problem in eventmachine 1.2.7 (x64-mingw32)

Unable to load the EventMachine C extension; To use the pure-ruby reactor, require "em/pure_ruby"
C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.5-x64-mingw32/lib/rubyeventmachine.rb:2:in `require': cannot load such file -- 2.4/rubyeventmachine (LoadError)
	from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.5-x64-mingw32/lib/rubyeventmachine.rb:2:in `<top (required)>'
	from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.5-x64-mingw32/lib/eventmachine.rb:8:in `require'
...

Solution

Remove eventmachine

gem uninstall eventmachine

Add gem 'eventmachine', '~> 1.0.0' in Gemfile to downgrade eventmachine-1.2.7 to eventmachine-1.0.9.1

Re-generate Gem package

bundle install
bundle update eventmachine

then run livereload it’s working fine.πŸ‘Œ

bundle exec jekyll serve --livereload