Installing Ruby 3.3.5 on MacOS on Intel chip

Trying to install with rbenv (ruby-build) and received this error:

./vm_callinfo.h:179:9: error: use of undeclared identifier 'RUBY_FUNCTION_NAME_STRING'

I found the advice from trinitronx in this RVM thread super helpful:

https://github.com/rvm/rvm/issues/5483#issuecomment-2230020845

I followed these steps:

  1. Enter the build directory created by rbenv
  2. Edit configure.ac and patch the code as described in the GitHub comment.
  3. Run ./autogen.sh from that folder
  4. Run make
  5. Run make install