Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make serve error: undefined method 'tainted'? #781

Closed
mtthsdzwn opened this issue Jan 30, 2023 · 2 comments
Closed

make serve error: undefined method 'tainted'? #781

mtthsdzwn opened this issue Jan 30, 2023 · 2 comments

Comments

@mtthsdzwn
Copy link
Contributor

I am trying to generate a preview for a Library Carpentry website using make serve. This used to work for previous websites, but now I see an error message. The message is quite long; I think the most relevant part is

Liquid Exception: undefined method `tainted?' for nil:NilClass in $WORKING_DIR/_extras/about.md

jekyll 3.9.2 | Error:  undefined method `tainted?' for nil:NilClass

$WORKING_DIR/.vendor/bundle/ruby/3.2.0/gems/liquid-4.0.3/lib/liquid/variable.rb:124:in `taint_check': undefined method `tainted?' for nil:NilClass (NoMethodError)

$WORKING_DIR is my local directory. The complete output from make serve is here.

It also says

To use retry middleware with Faraday v2.0+, install `faraday-retry` gem

which I've tried using sudo gem install faraday-retry. But that doesn't solve the error.

I've brought my changes to my gh-pages branch, and published the website despite this issue. The website publishes with any problems. But I would prefer to test my edits before publishing.

Do you know what the problem could be?

Some system information (will happily provide more, but please let me know what you need).

$ sw_vers
ProductName:		macOS
ProductVersion:		13.1
BuildVersion:		22C65
zsh --version
zsh 5.8.1 (x86_64-apple-darwin22.0)
bundle --version
Bundler version 2.4.5
@zkamvar
Copy link
Contributor

zkamvar commented Feb 8, 2023

I believe the message from Faraday is a red herring.

The problem is because liquid 4.0.3 (used by Jekyll) is incompatible with Ruby version 3.2.0 (see github/pages-gem#859).

I believe the solution is to add this to the bottom of the Gemfile:

if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.2.0')
    gem 'liquid', '>= 4.0.4'
end

The reason why github pages deploys the site is because it uses ruby 2.7.4: https://pages.github.com/versions/

@mtthsdzwn
Copy link
Contributor Author

Thanks, works!

mtthsdzwn added a commit to ubvu/2023-03-27-online that referenced this issue Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants