Fixing Ruby 2.7 compilation error on Big Sur
We’re in the process of upgrading to Ruby 2.7.2 at castle.io and today I had to install it on macOS Big Sur. Unfortunately, I hit a compilation error that looked like this: $ ruby-install ruby 2.7.2 # yada yada yada compiling dmyext.c translating probes probes.d . ./vm_opts.h compiling array.c compiling ast.c compiling bignum.c compiling class.c compiling compar.c compiling compile.c compile.c:9857:61: error: use of undeclared identifier 'RUBY_FUNCTION_NAME_STRING' if (table == NULL) rb_bug("%s: table is not provided.", RUBY_FUNCTION_NAME_STRING); ^ compile.c:9859:63: error: use of undeclared identifier 'RUBY_FUNCTION_NAME_STRING' rb_bug("%s: index (%d) mismatch (expect %s but %s).", RUBY_FUNCTION_NAME_STRING, i, name, table[i].name); ^ 2 errors generated. make: *** [compile.o] Error 1 !!! Compiling ruby 2.7.2 failed! After some digging I managed to solve this problem by doing the following: ...