Upgrading very old Discourse Get Ruby error

Given the age of the host machine, your best bet here is probably to take a backup of the site, create a new server, do the install, then restore the backup onto the new server.

It’s going to be less work (and a lot easier) than upgrading the existing server.