Jekyll 3.4.3 | Error: undefined method `error_mode=' for Liquid::Template:Class

I’m having some trouble to get Jekyll (or Liquid?) running on my Windows box using the Ubuntu Bash WSL-Stuff.

I followed this blogpost http://daverupert.com/2016/04/jekyll-on-windows-with-bash/

Unfortunatly it fails with one warning and one error:

robert@XMG-ROBERT:/mnt/d/Temp/my-awesome-site2$ sudo jekyll build
/usr/lib/ruby/vendor_ruby/liquid/htmltags.rb:43: warning: key “index0” is duplicated and overwritten on line 46
Configuration file: /mnt/d/Temp/my-awesome-site2/_config.yml
jekyll 3.4.3 | Error: undefined method `error_mode=’ for Liquid::Template:Class

This is my gem list:

robert@XMG-ROBERT:/mnt/d/Temp/my-awesome-site2$ gem list

*** LOCAL GEMS ***

addressable (2.5.1)
bigdecimal (1.2.8)
bundle (0.0.1)
bundler (1.14.6)
colorator (1.1.0)
ffi (1.9.18)
forwardable-extended (2.6.0)
iconv (1.0.4)
io-console (0.4.5)
jekyll (3.4.3)
jekyll-feed (0.9.2)
jekyll-sass-converter (1.5.0)
jekyll-watch (1.5.0)
json (1.8.3)
kramdown (1.13.2)
liquid (3.0.6)
listen (3.0.8)
mercenary (0.3.6)
minima (2.1.1)
pathutil (0.14.0)
psych (2.1.0)
public_suffix (2.0.5)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
rdoc (4.2.1)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.23)

and the gem.lock file

GEM
remote: https://rubygems.org/
specs:
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
colorator (1.1.0)
ffi (1.9.18)
ffi (1.9.18-java)
ffi (1.9.18-x64-mingw32)
ffi (1.9.18-x86-mingw32)
forwardable-extended (2.6.0)
jekyll (3.4.3)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-feed (0.9.2)
jekyll (~> 3.3)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.13.2)
liquid (3.0.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
minima (2.1.1)
jekyll (~> 3.3)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
public_suffix (2.0.5)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.23)
thread_safe (0.3.6)
thread_safe (0.3.6-java)
tzinfo (1.2.3)
thread_safe (~> 0.1)
tzinfo-data (1.2017.2)
tzinfo (>= 1.0.0)

PLATFORMS
java
ruby
x64-mingw32
x86-mingw32
x86-mswin32

DEPENDENCIES
jekyll (= 3.4.3)
jekyll-feed (~> 0.6)
minima (~> 2.0)
tzinfo-data

RUBY VERSION
ruby 2.3.4p301

BUNDLED WITH
1.14.6

The content of the blog is just the default “Hello World Jekyll Stuff”.

What do I miss? Thanks for any help!

1 Like

What’s on line 46 of your _config.yml?

/usr/lib/ruby/vendor_ruby/liquid/htmltags.rb:43: warning: key "index0" is duplicated and overwritten on line 46
Configuration file: /mnt/d/Temp/my-awesome-site2/_config.yml

Nothing - it is more or less a blank _config.yml file and has only 34 lines.

# Welcome to Jekyll!
#
# This config file is meant for settings that affect your whole blog, values
# which you are expected to set up once and rarely edit after that. If you find
# yourself editing this file very often, consider using Jekyll's data files
# feature for the data you need to update frequently.
#
# For technical reasons, this file is *NOT* reloaded automatically when you use
# 'bundle exec jekyll serve'. If you change this file, please restart the server process.

# Site settings
# These are used to personalize your new site. If you look in the HTML files,
# you will see them accessed via {{ site.title }}, {{ site.email }}, and so on.
# You can create any custom variable you would like, and they will be accessible
# in the templates via {{ site.myvariable }}.
title: Your awesome title
email: your-email@domain.com
description: > # this means to ignore newlines until "baseurl:"
  Write an awesome description for your new site here. You can edit this
  line in _config.yml. It will appear in your document head meta (for
  Google search results) and in your feed.xml site description.
baseurl: "" # the subpath of your site, e.g. /blog
url: "" # the base hostname & protocol for your site, e.g. http://example.com
twitter_username: jekyllrb
github_username:  jekyll

# Build settings
markdown: kramdown
theme: minima
gems:
  - jekyll-feed
exclude:
  - Gemfile
  - Gemfile.lock

The error also occures when I just have one static index.html in the folder, which should just work (at least it does on GH Pages)

When I do a jekyll build --trace I got this, maybe this is helpful:

robert@XMG-ROBERT:/mnt/d/Temp/my-awesome-site2$ jekyll build --trace
/usr/lib/ruby/vendor_ruby/liquid/htmltags.rb:43: warning: key "index0" is duplicated and overwritten on line 46
Configuration file: /mnt/d/Temp/my-awesome-site2/_config.yml
/var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/liquid_renderer.rb:8:in `initialize': undefined method `error_mode=' for Liquid::Template:Class (NoMethodError)
        from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/site.rb:28:in `new'
        from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/site.rb:28:in `initialize'
        from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/commands/build.rb:28:in `new'
        from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/commands/build.rb:28:in `process'
        from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/lib/jekyll/commands/build.rb:16:in `block (2 levels) in init_with_program'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go'
        from /var/lib/gems/2.3.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program'
        from /var/lib/gems/2.3.0/gems/jekyll-3.4.3/exe/jekyll:13:in `<top (required)>'
        from /usr/local/bin/jekyll:22:in `load'
        from /usr/local/bin/jekyll:22:in `<main>'

I reinstalled the Ubuntu on Windows stuff and did everything again - now it is working. No idea why, but ok for me.

1 Like

Great to hear you’ve bee able to resolve this because I’m having the exact same issues (albeit w/ Jekyll v3.6.2). May I ask what steps did you take to reinstall WSL?