Jekyll: Live Reload On Windows 10
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)
1Unable to load the EventMachine C extension; To use the pure-ruby reactor, require "em/pure_ruby"
2C:/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)
3 from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.5-x64-mingw32/lib/rubyeventmachine.rb:2:in `<top (required)>'
4 from C:/tools/ruby24/lib/ruby/gems/2.4.0/gems/eventmachine-1.2.5-x64-mingw32/lib/eventmachine.rb:8:in `require'
{: lang=“bash”}
Solution
Remove eventmachine
1gem uninstall eventmachine
{: lang=“bash”}
Add gem 'eventmachine', '~> 1.0.0'
in Gemfile to downgrade eventmachine-1.2.7 to eventmachine-1.0.9.1
Re-generate Gem package
1bundle install
2bundle update eventmachine
{: lang=“bash”}
then run livereload it’s working fine.👌
1bundle exec jekyll serve --livereload
{: lang=“bash”}