github / pages-gem

A simple Ruby Gem to bootstrap dependencies for setting up and maintaining a local Jekyll environment in sync with GitHub Pages
http://pages.github.com
MIT License
1.83k stars 353 forks source link

Error: undefined method `tainted?` when using Ruby v3.2.0 #859

Closed nshki closed 1 year ago

nshki commented 1 year ago

Before submitting an issue, please be sure to

This issue affects

The GitHub Pages Gem is intended to help users replicate the GitHub Pages build environment locally. If your issue affects both the hosted version and the version previewed locally, you may be better suited reporting seeking support in other forums.

What did you do (e.g., steps to reproduce)

  1. Install Ruby v3.2.0 via rbenv with rbenv install 3.2.0.
  2. Set global Ruby version to v3.2.0 with rbenv global 3.2.0.
  3. bundle install in the Jekyll repo.
  4. Try starting a dev server with bundle exec jekyll serve.

What did you expect to happen?

The Jekyll project to run on localhost:4000.

What happened instead?

The following error was thrown in the terminal:

  Liquid Exception: undefined method `tainted?' for "2013-12-27T00:00:00-08:00":String in /_layouts/post.html                                                                          
jekyll 3.9.2 | Error:  undefined method `tainted?' for "2013-12-27T00:00:00-08:00":String                                                                                              
/Users/nshki/.rbenv/versions/3.2.0/lib/ruby/gems/3.2.0/gems/liquid-4.0.3/lib/liquid/variable.rb:124:in `taint_check': undefined method `tainted?' for "2013-12-27T00:00:00-08:00":String (NoMethodError)
parkr commented 1 year ago

Liquid 4 is not compatible with Ruby 3.2. https://github.com/Shopify/liquid/issues/1625#issuecomment-1254061820

parkr commented 1 year ago

Liquid is updated. Upgrade to v4.0.4.