This is very suspicious - what kind of install is this? Have you followed the standard install?
The current version of Ruby on which a whole host of code relies is 3.2.2
Are you using the official discourse repo on branch tests-passed
?
Something is very wrong with your installation here.