Install Discourse on macOS for development

For anyone who started from the Discourse Development README and came here – if you’re setting up your dependencies for the first time, I’d recommend PostgreSQL 14+, even though it says PostgreSQL 13 in the README.

Why? When you set up your database and run the migrations, it’ll fail when it tries to access the pgvector extension in one of the migrations. And installing pgvector for PostgreSQL 13 is a bit of a pain. But if you install PostgreSQL 14 and then pgvector, it’ll all just work.

I’d recommend Homebrew for both:

brew install postgresql@14
brew install pgvector

Also! You’ll get an error the first time you run the Rails server if you don’t have ImageMagick installed. (I know it says it’s optional at the top of this guide)

Hope this helps… someone!

3 Likes