"Homebrew must be run under Ruby 2.6! You're running 2.3.7" when trying to install package

I’m trying to help out a colleague. She’s trying to install a package using Homebrew and getting the error message:

Homebrew must be run under Ruby 2.6! You’re running 2.3.7.

This is on Mac OS X High Sierra 10.13.6.

I’m not sure how her Homebrew got updated to a version that requires a newer Ruby than the system Ruby and I’m not sure how to upgrade Ruby without Homebrew.

Has anyone else run into this problem or have a suggested fix?

Try updating the command line tools and see if there’s security updates?

The problem likely is that a certificate from Apple expired in mid-October 2019, and Apple has failed to update it yet. So go to System Preferences, unlock, disable automatic time synchronization and change system time to, say, Oct 1 2019. Then open XCode, it will offer to update tools, let it do wo, then set time back to automatic synchronization

1 Like

Or just download them from the website. Way easier and doesn’t break anything else in the process