brew: `Error: cannot load such file -- nokogiri` on livecheck run

brew config output

HOMEBREW_VERSION: 3.1.9-116-gd2ddb80
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: d2ddb80cf4c3b518e776a926bea5c1f02be67369
Last commit: 26 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: eaa9ef741c7ad0e66cbf0764182571c637d28fba
Core tap last commit: 3 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_DEVELOPER: set
HOMEBREW_EDITOR: nano
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit kabylake
Clang: 12.0.5 build 1205
Git: 2.31.1 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 11.5-x86_64
CLT: 12.5.0.0.1.1617976050
Xcode: 12.5

brew doctor output

Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: You have unlinked kegs in your Cellar.
Leaving kegs unlinked can lead to build-trouble and cause formulae that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
  php

Warning: You have uncommitted modifications to Homebrew/homebrew-core.
If this is a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
  cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core && git stash && git clean -d -f

Uncommitted files:
  ?? Formula/graal.rb

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

run brew livecheck --installed --newer-only to update software in brew.

What happened (include all command output)?

[sean] ~> brew livecheck --installed --newer-only
contentful-cli : 1.6.40 ==> 1.6.41
Error: cannot load such file -- nokogiri
Please report this issue:
  https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/livecheck/strategy/sparkle.rb:61:in `require'
/usr/local/Homebrew/Library/Homebrew/livecheck/strategy/sparkle.rb:61:in `item_from_content'
/usr/local/Homebrew/Library/Homebrew/livecheck/strategy/sparkle.rb:119:in `find_versions'
/usr/local/Homebrew/Library/Homebrew/livecheck/livecheck.rb:532:in `block in latest_version'
/usr/local/Homebrew/Library/Homebrew/livecheck/livecheck.rb:479:in `each'
/usr/local/Homebrew/Library/Homebrew/livecheck/livecheck.rb:479:in `each_with_index'
/usr/local/Homebrew/Library/Homebrew/livecheck/livecheck.rb:479:in `latest_version'
/usr/local/Homebrew/Library/Homebrew/livecheck/livecheck.rb:189:in `block in run_checks'
/usr/local/Homebrew/Library/Homebrew/livecheck/livecheck.rb:142:in `map'
/usr/local/Homebrew/Library/Homebrew/livecheck/livecheck.rb:142:in `with_index'
/usr/local/Homebrew/Library/Homebrew/livecheck/livecheck.rb:142:in `run_checks'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/livecheck.rb:115:in `livecheck'
/usr/local/Homebrew/Library/Homebrew/brew.rb:122:in `<main>'

What did you expect to happen?

return outdated software

Step-by-step reproduction instructions (by running brew commands)

`brew livecheck --installed --newer-only`

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (17 by maintainers)

Most upvoted comments

At this point I think the appropriate solution is to remove the use of nokogiri in favour of rexml (which doesn’t require a native gem).

I’ve been working on fixing/improving parts of the Sparkle strategy in relation to an open PR, so I’ll look into switching to rexml while I’m at it.

I’ve been planning to add a generic Xml strategy at some point and have Sparkle use parts of it internally, so it may make sense to do this together.

Edit: I now have this implemented locally and I’m working on putting the finishing touches on it before creating a PR.