Brew ruby load error

I literally just did
brew update

and it said

Updated 2 taps (homebrew/core and homebrew/cask). No changes to formulae.

and then I did
brew install brew because my mind broke. I immediately Ctrl-C’d that. What I wanted to do was

brew install git

and Now every brew install command produces this error:

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require: cannot load such file -- vendor/bundle/bundler/setup (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in require from /usr/local/Homebrew/Library/Homebrew/load_path.rb:7:in <top (required)> from /usr/local/Homebrew/Library/Homebrew/global.rb:8:in require_relative from /usr/local/Homebrew/Library/Homebrew/global.rb:8:in <top (required)> from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in require_relative from /usr/local/Homebrew/Library/Homebrew/brew.rb:21:in <main>

even brew doctor gives the same output. what should I do now. I found a SO question too, and it has many upvotes, meaning other people are experiencing this issue too, but there is no answer. Link

Please help, Thanks! :smile:

I basically ran the installation script again. Didn’t uninstall it.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

and it worked. All my packages are still here, so that’s a relief.

Thank you guys so much for the help! Much appreciated :sunny:

Glad to hear that you got it working!

In general in future you can run brew update-reset which should resolve this case.