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
- fix(Dockerfile): Don't use latest ruby (3.2) due to bug (more) - https://github.com/jekyll/jekyll/issues/9233 — committed to ondrejsika/ondrejsika.com by ondrejsika a year ago
- Fix compatibility with new ruby versions Update liquid because of https://github.com/jekyll/jekyll/issues/9233. — committed to domoritz/pages-gem by domoritz a year ago
- Update Jekyll gem and add Liquid gem There is an issue with Liquid on newer versions of Ruby. [1] We don't want to use an old version of Ruby, so the solution is to point to the exact Liquid library ... — committed to womanonrails/bemore.womanonrails.com by torrocus 9 months ago
- Update Jekyll gem and other Ruby gems After updating the Ruby version, the following problem occurred: > Liquid Exception: undefined method `tainted?' > for "/article/2008/10/21/pierwsze-spotkanie.... — committed to SRUG/srug.github.io by torrocus 8 months ago
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:
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:
@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).