# Error using Jekyll build and Jekyll serve

**URL:** <https://talk.jekyllrb.com/t/error-using-jekyll-build-and-jekyll-serve/1211>\
**Category:** Help\
**Created:** [November 28, 2017, 10:43pm UTC](https://talk.jekyllrb.com/t/error-using-jekyll-build-and-jekyll-serve/1211 "2017-11-28T22:43:27Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cajab](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/cajab/32/919_2.png) [@cajab](https://talk.jekyllrb.com/u/cajab)\
**Post date:** [November 28, 2017, 10:43pm UTC](https://talk.jekyllrb.com/t/error-using-jekyll-build-and-jekyll-serve/1211/1 "2017-11-28T22:43:27Z")

</div>

I’m just getting started with Jekyll, taking over a website/app deployments from the developers. My colleague actually tried this first, and reported a slightly different issue ([https://github.com/jekyll/jekyll/issues/5873#issuecomment-278823777](https://github.com/jekyll/jekyll/issues/5873#issuecomment-278823777)). Essentially the steps I was told to follow were:

1. Checkout productive branch: git checkout productive
2. Bring changes from master into productive: git merge --no-ff master
3. Optimize source code with require: r.js -o ./app/app.build.js (using local installation of r.js)
4. Copy optimized files from require build folder to application folder:
5. copy minified main.js: cp …/build/app/main.js ./app/main.js
6. copy minified main.css: cp …/build/assets/css/main.css ./assets/css/main.css
7. Build site locally: run jekyll build
8. Test site locally: run jekyll serve, wait and in your browser go to localhost:4000 or [http://127.0.0.1:4000/](http://127.0.0.1:4000/)

I’m running Windows 10, and have Jekyll v 3.6.2 installed.

Steps 1-4 work just fine, however I am encountering errors whenever I run `bundle exec jekyll build`

**Output**  
Configuration file: c:/Users/cjab/dsm/\_config.yml  
Source: c:/Users/cjab/dsm  
Destination: c:/Users/cjab/dsm/\_site  
Incremental build: disabled. Enable with --incremental  
Generating…  
c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/readers/post\_reader.rb:39:in `block in read_publishable': undefined method`valid\_encoding?’ for nil:NilClass (NoMethodError)  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/readers/post\_reader.rb:38:in `select' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/readers/post_reader.rb:38:in`read\_publishable’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/readers/post\_reader.rb:27:in `read_posts' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/reader.rb:65:in`retrieve\_posts’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/reader.rb:52:in `read_directories' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/reader.rb:18:in`read’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:165:in `read' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/site.rb:71:in`process’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/command.rb:28:in `process_site' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/commands/build.rb:65:in`build’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/commands/build.rb:36:in `process' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/commands/serve.rb:42:in`block (3 levels) in init\_with\_program’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/commands/serve.rb:42:in `each' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/lib/jekyll/commands/serve.rb:42:in`block (2 levels) in init\_with\_program’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in`each’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in`go’  
from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' from c:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/jekyll-3.6.2/exe/jekyll:15:in`\<top (required)\>'  
from c:/Ruby24-x64/bin/jekyll:23:in `load' from c:/Ruby24-x64/bin/jekyll:23:in`’

Any help with this issue would be much appreciated!

---

<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:** [November 29, 2017, 2:37am UTC](https://talk.jekyllrb.com/t/error-using-jekyll-build-and-jekyll-serve/1211/2 "2017-11-29T02:37:18Z")

</div>

Looks like something’s wrong with your posts…  
Please enclose the contents of your terminal output within a pair of backticks, like so:

`````
```
output from terminal
````

`````

What are the contents of your `_posts` directory? (Providing two or three **filenames** may be sufficient for now…)
