Just finished setting up a dev environment from scratch on a factory-reset MacBook. I used Homebrew for everything I could. Not saying this is the best approach, but that’s my step-by-step:
If new installs don’t show, update shell during steps source .zprofile
Install dependencies with Homebrew
brew install git
brew install rbenv
rbenv install ruby 3.4.6
rbenv global 3.4.6
ruby --version
gem update
gem install rails
rails --version
brew install postgresql pgvector
brew services start postgres
brew install redis
brew services start redis
brew install nvm
(see nvm — Homebrew Formulae for shell profile adjustments)
nvm --version
nvm install 22
node -v
brew install pnpm
Install Discourse
Same as op, starting at Clone Discourse