jekyll: [Bug]:

Operating System

Ubuntu 22.04

Ruby Version

ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]

Jekyll Version

jekyll 3.9.2

GitHub Pages Version

No response

Expected Behavior

I am able to serve a basic Jekyll site with bundle exec jekyll serve

Current Behavior

“Liquid Exception: undefined method untaint' for "Welcome to Jekyll!":String in /_layouts/post.html jekyll 3.9.2 | Error: undefined method untaint’ for “Welcome to Jekyll!”:String /home/thuston/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/liquid-4.0.3/lib/liquid/standardfilters.rb:42:in escape': undefined method untaint’ for “Welcome to Jekyll!”:String (NoMethodError)”

I tried to update my blog after ignoring it for some time and was unable to do so, every time I tried to Jekyll Serve I would get the error “Liquid Exception: undefined method `tainted?’ for “Code”:String in /_layouts/page.html”

Wasn’t able to find an immediate fix so I removed Ubuntu from WSL, installed 22.04, re-installed Jekyll and everything, got the same error. So then I created a new Jekyll site with just jekyll new test, tried to serve that, and for the error listed above.

So fresh Linux install, fresh Jekyll install, fresh site. Any ideas?

Relevant log output

No response

Code Sample

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 18
  • Comments: 17 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Resolved with release of Liquid 4.0.4

To Everyone intending to use Jekyll on Ruby 3.2, we have decided to patch the issue at our end with #9248. Please point your Gemfile to the pull request and let us know if your build still fails:

# in your Gemfile
gem "jekyll", github: "jekyll/jekyll", ref: "refs/pull/9248/head"

How do I install Ruby 3.1.2, with chruby and ruby-install?

The install guide https://jekyllrb.com/docs/installation/macos/ installs Ruby 3.2.0 but expects to have installed 3.1.2

edit:

ruby-install ruby 3.1.2

@eloydegen it’s not a regression but an expected effect of a planned removal of certain methods from the Ruby language core.

I changed the ruby version to 3.1.3 in deploy yml file, and it worked.

The only solution currently is to uninstall Ruby 3.2. Install Ruby 3.1.2 (or older upto Ruby 2.7.x).