Guide to Setting Up Discourse Development Environment - Windows 11

Hi :waving_hand:, I am using WSL2 under Windows 11, and I followed the steps in this post to install a local Discourse development instance. I encountered some issues, but I was eventually able to resolve them. Here is what I found:

(At first I tried with ubuntu-20.04 but I was running into an issue with missing libwebp7 dependency which is required during installation of ImageMagick. It seems libwebp7 is not available for For ubuntu-20.04) :right_arrow: So I decided to use ubuntu-22.04 instead which worked for me.

Following @AliBenBongo’s guide in the opening post, everything before step 9) worked as expected. :+1:

In step 9) a few changes were necessary

Some of the resources in https://raw.githubusercontent.com/discourse/install-rails/master/linux are not up to date, it seems:

  • I had to install Ruby 3.3.x instead of 3.2.1 by changing ruby_version=“3.2.1” to ruby_version=“3.3.9”
  • I had to install Node 20 instead of 18 by changing curl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - to curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -

In step 15) you need to run pnpm install instead of yarn install

Then, when running migrations in step 16), it threw an error for some migrations depending on the pgvector Postgres extension. So I followed the Linux installation guide here: https://github.com/pgvector/pgvector/blob/master/README.md

:warning:To be on the safe side, it’s better to copy the commands directly from the readme file. However, if you’re curious, this is what worked for me::

git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
cd pgvector
make
sudo make install

After that, I was able to run the migrations in step 16 and completed the installation by following the rest of the guide. :tada:

1 Like