for some reason i picked this fight. and i lost.
first install rbenv and ruby build with brew [brew]:
brew install rbenv ruby-build
then install ruby
rbenv install 3.2.2
and set the version as global
rbenv global 3.2.2
then? whatever i do, ruby -v still shows some old version.
after updating ruby with brew upgrade bundler can throw an error like this:
/opt/homebrew/opt/ruby/bin/bundle:25:in load': cannot load such file -- /opt/homebrew/lib/ruby/gems/3.3.0/gems/bundler-2.4.22/exe/bundle (LoadError) from /opt/homebrew/opt/ruby/bin/bundle:25:in <main>'
in this case, just uninstall bundler and re-install it again:
gem uninstall bundler -a
gem install bundler