The only working installation guide seems to be
https://raw.githubusercontent.com/discourse/install-rails/master/linux seems to be outdated.
It installs ruby 3.1.3 and node 16, while the current base image uses ruby 3.2.1 and node 18.
I got it running on Debian 11 but got other errors in the follow-up.
Switching to the dockerized dev environment solved most problems.