Closed srussking closed 1 year ago
There seems to be a problem with older versions of ruby. I use ruby v 2.4.10, nokogiri v 1.10.10 and getting the error
NameError: uninitialized constant Nokogiri::HTML4
Did you mean? Nokogiri::HTML
....rbenv/versions/2.4.10/lib/ruby/gems/2.4.0/gems/loofah-2.21.1/lib/loofah/html4/document.rb:10:in `<module:HTML4>'
Thanks!
It seems it has to do with nokogiri version. Same error on ruby 2.6.8.
Maybe a new version needs to be released, with nokogiri dependency > 12 (instead of >= 1.5.9)? 🙏
Thanks.
Thanks for the comments, everyone. I'll look into it.
PR at #267, if all is well I should be able to cut a patch release quickly.
v2.21.2 has been released fixing this. Thanks for your patience.
@flavorjones won't it still look for v2.21.1 in the case of nokogiri 1.10.10?
@abhisapate Are you having a problem? I'd be happy to try to help, but I need more information.
Yeah, in case I don't specify the loofah version in Gemfile and we are using Ruby 2.4.10 and nokogiri is locked to 1.10.10.
Before this patch it was fetching loofah v2.21.1 but the dependencies were updated in the patch for v2.21.2, so the bundler will still get the version v2.21.1 which will give me the below error, right?
NameError: uninitialized constant Nokogiri::HTML4
Did you mean? Nokogiri::HTML
....rbenv/versions/2.4.10/lib/ruby/gems/2.4.0/gems/loofah-2.21.1/lib/loofah/html4/document.rb:10:in `<module:HTML4>'
also seeing this on sentry-ruby
https://github.com/getsentry/sentry-ruby/actions/runs/4829581698/jobs/8913943865
EDIT:
ok just saw the min 2.5 ruby requirement, will fix on our end. you can ignore!
I'm not yanking these versions of the gem, as yanking tends to be very disruptive to the community. Please pin this dependency in your apps if you're on Ruby 2.4 or earlier, or consider upgrading. Apologies for the inconvenience.
@flavorjones Sure, I'll specify the version in Gemfile. Thanks for the help!
Hi, I am getting the following error:
It seems that Nokogiri added the HTML4 name in version 1.12.x, so upgrading to the latest Nokogiri seems to fix this, but might be better if you were requiring that in your gemspec, which SEEMS to be 1.5.9?
Thanks!