"rake aborted!" on "sudo bundle exec rake db:create" cmd (macOS M1)

This is because brew install postgresql was recently updated to brew install postgresql@14. I have updated the install script to reflect the same.

https://github.com/discourse/install-rails/commit/cc5746156a81b98962899ece7867f9d4dab968f9

Running brew install postgresql@14 should fix this issue for you.