A patch is available on 3 Jan 2024: Commit: patch 9.1.0003: Cannot build against Ruby 33 dynamically.
However, it looks like the latest MacVim release (r179 on 5 Jan 2024) does not include that patch.
Install Ruby 3.2 with Homebrew (keg-only):
brew install [email protected]
Set up Vim to use Ruby 3.2:
set rubydll=/opt/homebrew/Cellar/ruby@3.2/3.2.3/lib/libruby.3.2.dylib
Compile Command-T with Ruby 3.2:
cd bundle/command-t/ruby/command-t/ext/command-t
make clean
/opt/homebrew/opt/[email protected]/bin/ruby extconf.rb && make