`bundle exec jekyll serve` stuck after detecting config file on Windows 10

Whenever I do bundle exec jekyll serve in the command line, it gets stuck at this line

Configuration file: C:/Users/User/blog_dir/_config.yml

and the terminal just hangs at this command, nothing happens even after 1 hour.

I have tried doing bundle add webrick, adding gem "webrick" to my Gemfile, and bundle install, etc, but all of these solutions do not work and the command still just gets stuck after detecting the config file, even after adding webrick.

Current versions of stuff being used
Ruby: 3.0.2p107 (2021-07-07 revision 0db68f0233) [x64-mingw32]
Bundler: 2.2.30
Windows 10 Home: 10.0.19043 Build 19043

I have tried on different OSes and machines, literally this problem only happens on windows. Does anyone know how to solve this?

maybe there is some sort of illegal character in the config file? is this from a new jekyll site or did you copy from somewhere?

what is in the config file? link to repo?

I cannot give the link to the repo because the repo is private, and no there are no illegal characters in the config file. Everything runs fine when I run the command on linux, so I don’t think that should be the issue… :frowning:

The config file is based off a theme that I was using, but has been edited since. The theme is here Jekyll Atlantic Theme - Zerostatic

The blog is not new, I have been working on it on some time, but I am limited to working on the site on linux because I cannot get bundle exec jekyll serve to run on Windows…

@raniceyue I suggest trying a build using Ruby 2.7 on Windows.
(Ensure 2.7 by running ridk use ... before invoking Jekyll).

If it still hangs, try again by appending --verbose to the invocation.
If it doesn’t hang on Ruby 2.7 and you would really like to use Ruby 3 on Windows, try installing the very recent Ruby 3.0.3.

Thank you so much for the suggestion.

I have downloaded and installed ruby 2.7 + the devkit, ran ridk use 2.7 and ran bundle exec jekyll serve --verbose, however the problem still persists and the command still gets stuck

Here is the output, and it literally just stops here

C:\Users\ranny\Github\cafe-exploitation>bundle exec jekyll serve --verbose
  Logging at level: debug
    Jekyll Version: 4.2.1
Configuration file: C:/Users/ranny/Github/cafe-exploitation/_config.yml
  Logging at level: debug
    Jekyll Version: 4.2.1
         Requiring: jekyll-environment-variables
         Requiring: jekyll-postcss
         Requiring: jekyll-paginate

Does it have something to do with the version of Jekyll that I’m using??? I am pretty 100% sure I am using ruby 2.7 here…

I am unable to install the most latest version of ruby as it is not available via the ruby installer for windows yet. I guess if I really can’t work this out I’ll just stick to using Jekyll on Linux…

did you uninstall the other ruby just to be sure? which ruby should tell you which ruby is currently setup.

I use win 10 and have never had a problem.

What happens if you create a new jekyll site and run that? does that work?

Hello, I have just tried creating a new blog with jekyll new and WOW the new blog actually works with no issues… That means it must be a problem with my gemfile or one of the plugins that I’m using?

Here is my gemfile

source "https://rubygems.org"

gem "jekyll", "~> 4.1"
gem "jekyll-environment-variables"
gem "jekyll-postcss"
gem "jekyll-paginate"
gem "webrick"

Does anyone have any ideas?

1 Like

Well your log message stopped at paginate step so I guess that could be it. Disable that plugin and see if it helps.

Otherwise disable plugins one by one. By one of them has poor Windows support.

You can also use the Jekyll new Gemfile. Note with this one it includes gems specific to improve or fix Windows behavior so I’d say try that

did you install postcss? jekyll-postcss says you must install it as well as putting it in your gemfile. Not sure what that means, I assume it is an npm module but not positive.