# Unable to build Jekyll site locally

**URL:** <https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498>\
**Category:** Help\
**Created:** [January 12, 2021, 3:15pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498 "2021-01-12T15:15:09Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElizabethWarden](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ElizabethWarden](https://talk.jekyllrb.com/u/ElizabethWarden)\
**Post date:** [January 12, 2021, 3:15pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/1 "2021-01-12T15:15:09Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [January 12, 2021, 7:49pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/2 "2021-01-12T19:49:31Z")

</div>

The default error messaging is minimal.

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

```auto
bundle exec jekyll serve --trace

```

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [January 12, 2021, 7:51pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/3 "2021-01-12T19:51:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ElizabethWarden](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ElizabethWarden](https://talk.jekyllrb.com/u/ElizabethWarden)\
**Post date:** [January 12, 2021, 7:51pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/4 "2021-01-12T19:51:31Z")

</div>

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 `’

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [January 12, 2021, 7:54pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/5 "2021-01-12T19:54:40Z")

</div>

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

````
```
Paste here as code 
or output
```

````

Result:

```auto
Paste here as code
or output 

```

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [January 12, 2021, 8:04pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/6 "2021-01-12T20:04:52Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [January 12, 2021, 8:06pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/7 "2021-01-12T20:06:35Z")

</div>

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

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

```

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [January 14, 2021, 2:27pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/8 "2021-01-14T14:27:29Z")

</div>

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

```auto
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?

---

<div class="post-metadata">

**Author:** ![ElizabethWarden](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ElizabethWarden](https://talk.jekyllrb.com/u/ElizabethWarden)\
**Post date:** [January 19, 2021, 4:51pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/9 "2021-01-19T16:51:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ashmaroli](https://avatars.discourse-cdn.com/v4/letter/a/df705f/32.png) [@ashmaroli](https://talk.jekyllrb.com/u/ashmaroli)\
**Post date:** [January 20, 2021, 6:00am UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/10 "2021-01-20T06:00:36Z")

</div>

> [@ElizabethWarden](#):
>
> Yes, I do have that Gem.win\_platform file in the directory you indicated

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.

---

<div class="post-metadata">

**Author:** ![ElizabethWarden](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@ElizabethWarden](https://talk.jekyllrb.com/u/ElizabethWarden)\
**Post date:** [January 20, 2021, 1:07pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/11 "2021-01-20T13:07:44Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Mdata009](https://avatars.discourse-cdn.com/v4/letter/m/f05b48/32.png) [@Mdata009](https://talk.jekyllrb.com/u/Mdata009)\
**Post date:** [February 7, 2021, 5:16am UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/12 "2021-02-07T05:16:22Z")

</div>

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>'
```

---

<div class="post-metadata">

**Author:** ![Leno4ka94](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/leno4ka94/32/4001_2.png) [@Leno4ka94](https://talk.jekyllrb.com/u/Leno4ka94)\
**Post date:** [October 16, 2021, 7:40pm UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/13 "2021-10-16T19:40:18Z")

</div>

hello! i have the same problem too. How you can fix this problem? thank you

---

<div class="post-metadata">

**Author:** ![rdyar](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/rdyar/32/710_2.png) [@rdyar](https://talk.jekyllrb.com/u/rdyar)\
**Post date:** [October 18, 2021, 3:11am UTC](https://talk.jekyllrb.com/t/unable-to-build-jekyll-site-locally/5498/14 "2021-10-18T03:11:31Z")

</div>

you should create a new post and give your details there, especially the output from the terminal as well as a link to the repo if you can.
