Unable to build Jekyll site locally

I was able to locally build my Jekyll site and then a few months ago, it just wouldn’t build. To my knowledge, nothing changed. I’m finally digging into why it won’t build.

I enter the commands bundle update and bundle exec jekyll serve … and get this error:

Configuration file: C:/[FILEPATH]/doc-standards-processes/_config.yml

Jekyll 4.2.0 Please append --trace to the serve command
for any additional information or backtrace.

Has anyone encountered this before? Any tips?

The default error messaging is minimal.

Please follow the output suggestion and paste here as code. That will tell us why it broke.

bundle exec jekyll serve --trace

Maybe something changed in your Ruby version upgrading or dev tools.

In mac you want to use xcode and on linux install ruby-full with apt to get dev headers.

Here you go! I initially thought this was a Ruby issue, but after a few days with them, I’m told it is not.

$ bundle exec jekyll serve --trace
Configuration file: C:/Users/Elizabeth Warden/Documents/Git/DocProcess/doc-standards-processes/_config.yml
Source: C:/Users/Elizabeth Warden/Documents/Git/DocProcess/doc-standards-processes
Destination: C:/Users/Elizabeth Warden/Documents/Git/DocProcess/doc-standards-processes/_site
Incremental build: disabled. Enable with --incremental
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/utils.rb:141:in initialize': Invalid argument @ rb_sysopen - C:/Users/Elizabeth Warden/Documents/Git/DocProcess/doc-standards-processes/Gem.win_platform? (Errno::EINVAL) from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/utils.rb:141:in open’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/utils.rb:141:in has_yaml_header?' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/reader.rb:52:in block in read_directories’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/reader.rb:48:in each' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/reader.rb:48:in read_directories’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/reader.rb:16:in read' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:181:in read’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/site.rb:78:in process' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:28:in process_site’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:65:in build' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/build.rb:36:in process’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in block in process_with_graceful_fail' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in each’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in process_with_graceful_fail' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in block (2 levels) in init_with_program’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in block in execute' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in each’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in execute' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in go’
from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/mercenary-0.4.0/lib/mercenary.rb:21:in program' from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/jekyll-4.2.0/exe/jekyll:15:in <top (required)>’
from C:/Ruby27-x64/bin/jekyll:23:in load' from C:/Ruby27-x64/bin/jekyll:23:in

Can you edit and put that in code fences so it is monospaced?

Paste here as code 
or output


Paste here as code
or output 

Sorry I don’t know what’s up with that invalid argument.

Downgrade to Jekyll 4.1

Delete your lock file.

Delete your vendor folder.

Run bundle install for a clean install.

Then Jekyll serve.

Maybe it is something specific in your plugins or config. See if you can make a new simple project and run that.

Create a new directory outside the repo.

Add jekyll 4.1 to the Gemfile.

Run your steps to configure bundle and install gems to vendor directory.

If you get Jekyll installed there, you can do bundle exec jekyll new .

And then bundle exec jekyll serve

Or within your current project, you can try make a new bootstrapped project in a subdirectory. With it’s own gems and project files.

bundle exec jekyll new test-app
cd test-app
bundle exec jekyll serve

Hello @ElizabethWarden
The error can be summarized as being unable to open the following path:

C:/Users/Elizabeth Warden/Documents/Git/DocProcess/doc-standards-processes/Gem.win_platform?

Do you have such a directory in your Jekyll workspace?
Lastly, is it possible by any chance that your site’s source files be publicly accessible?

1 Like

Hi @ashmaroli - Yes, I do have that Gem.win_platform file in the directory you indicated.

I do not believe that our site’s source files are publicly accessible

Okay. Please delete that folder or file if it doesn’t contain anything important.
From Jekyll’s point of view, it is not an important folder or file.

1 Like

@ashmaroli That worked!!! I deleted the Gem.win_platform file and my site built locally! Thank you so much. I can’t believe it was such a simple solution.

1 Like