Install Discourse on macOS for development

I’ve been trying all day to do this but can’t get it to work.

Currently stuck at this stage, when I use bundle install I get the following errors:

compiling cppjieba_rb.c
compiling internal.cc make: *** [internal.o] Error 1 
make failed, exit code 2 
An error occurred while installing cppjieba_rb (0.4.4), and Bundler cannot continue.

I am on an M4 MacBook Pro. Any help appreciated!