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:
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
Generating…
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 ’
@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.
Hi ashmaroli,
I’m encountering exactly the same issue as Elizabeth. But apparently, the solution is not applicable to me, as I don’t see Gem.wi_platform file. Most likely because I’m on Mac.
Here’s the error details after running " bundler exec jekyll serve --trace".
I spent few hours on the internet but didn’t find any solution. Your inputs will be really appreciated here. Thanks in advance!
bundler: failed to load command: jekyll (/Users/GM4EVR/gems/bin/jekyll)
/Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in require': cannot load such file -- webrick (LoadError ) from /Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/commands/serve/servlet.rb:3:in <top (required)>’
from /Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in require_relative' from /Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:179:in setup’
from /Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:100:in process' from /Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in block in process_with_graceful_fail’
from /Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in each' from /Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/command.rb:91:in process_with_graceful_fail’
from /Users/GM4EVR/gems/gems/jekyll-4.2.0/lib/jekyll/commands/serve.rb:86:in `block (2 levels) in init_with_program’
from /Users/GM4EVR/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `block in execute'
from /Users/GM4EVR/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `each'
from /Users/GM4EVR/gems/gems/mercenary-0.4.0/lib/mercenary/command.rb:221:in `execute'
from /Users/GM4EVR/gems/gems/mercenary-0.4.0/lib/mercenary/program.rb:44:in `go'
from /Users/GM4EVR/gems/gems/mercenary-0.4.0/lib/mercenary.rb:21:in `program'
from /Users/GM4EVR/gems/gems/jekyll-4.2.0/exe/jekyll:15:in `<top (required)>'
from /Users/GM4EVR/gems/bin/jekyll:23:in `load'
from /Users/GM4EVR/gems/bin/jekyll:23:in `<top (required)>'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/cli/exec.rb:63:in `load'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/cli/exec.rb:28:in `run'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/cli.rb:494:in `exec'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/cli.rb:30:in `dispatch'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/cli.rb:24:in `start'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/exe/bundle:49:in `block in <top (required)>'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/lib/bundler/friendly_errors.rb:130:in `with_friendly_errors'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/exe/bundle:37:in `<top (required)>'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/exe/bundler:4:in `load'
from /Users/GM4EVR/gems/gems/bundler-2.2.8/exe/bundler:4:in `<top (required)>'
from /Users/GM4EVR/gems/bin/bundler:23:in `load'
from /Users/GM4EVR/gems/bin/bundler:23:in `<main>'