Upgrading very old Discourse Get Ruby error

I’m trying to update a very old installation.

I started with this:

cd /var/discourse
sudo git pull
sudo ./launcher rebuild app

Then I get a failed and scrolling up the log file the only error is this

ERROR: Error installing bundler:
bundler-2.5.3 requires Ruby version >= 3.0.0. The current ruby version is 2.7.2.137.

How do I go get a new install of Ruby? The system was installed originally from a docker image on Digital Ocean and hasn’t been upgraded much if at all for several years.

It’s running on Ubuntu 18.04

I ran ./discourse-doctor

and there was a detached head state and then rebuild and then the same Ruby error

I’m totally lost now.

Any help on how to get an upgrade to work from an ancient version?

Your container image might be pinned to a very old Discourse base image.

Can you post your (redacted) container config here?

I don’t know how to do that but from the discourse doctor output I found this

DOCKER VERSION: Docker version 19.03.1, build 74b1e89

And it was created 3 years ago

1 Like

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.

2 Likes

But since the install failed I can’t get discourse running to get a backup. I can and have taken a snapshot of the digital ocean droplet but that’s not really a backup as far as I understand it.

You should be able to just do ./launcher start app to reboot into the old site.

Tried that now getting 502 bad gateway issue :sigh:

1 Like

I’d rsync the old /var/discourse to the new server. Or maybe just containers and shared.

OK I’m so far out of my depth here that my solution is to go post a paid for help wanted ad in the Marketplace :grinning:

2 Likes

If you have a snapshot of the droplet with all your data prior to trying to update the container, you should be able to grab a backup from that.

If not, you’re almost definitely still fine, but you need someone savvy with the process to be able to pull the data out of it if you can’t get the container back up and running.

Right now, even with the bad gateway, if you can get into the container you should be able to run a discourse backup and get your data.

4 Likes