Replies: 1 comment 7 replies
-
We configure the LOAD_PATH here: https://github.com/Homebrew/brew/blob/5a09a06512fae4c434503edf2f236d379f5bb70c/Library/Homebrew/standalone/init.rb#L42-L46 It seems the |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Additional Info
Output of
brew config
Output of
brew doctor
Description of issue
I'm running on a brand new Ubuntu 23.04 installation. I'll try again with Ubuntu 23.10. The system Ruby on this machine is 3.1.2p20, which is not EOL yet.
sudo apt-get install build-essential procps curl file git
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
It looks to me like the vendor_ruby/os.rb file is conflicting with Homebrew. The former defines a class named
OS
, while the latter defines a module namedOS
. I don't know where that vendor_ruby file came from. It's basically a brand new machine so I'm guessing it got pulled in from a system package.If I look at the
$LOAD_PATH
, I see:Homebrew uses
require "os"
in a couple of locations and my best guess is it's supposed to be loading Homebrew's own os.rb. Replacing therequire
with arequire_relative
appears to fix the problem for me.I can work on a PR, but is there a reason the project is using
require
rather thanrequire_relative
? The latter is safer and faster if you're looking to load files within your own project. But, usingrequire
allows for patching code by manipulating the$LOAD_PATH
. I don't know if that's a use case we need to preserve.Beta Was this translation helpful? Give feedback.
All reactions