# Upgrading very old Discourse Get Ruby error

**URL:** https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387
**Category:** Self-hosting
**Created:** [February 14, 2024, 8:15pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387 "2024-02-14T20:15:25Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Oogiem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oogiem/32/363317_2.png) [@Oogiem](https://meta.discourse.org/u/Oogiem)
#### Post date: [February 14, 2024, 8:15pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/1 "2024-02-14T20:15:25Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 14, 2024, 8:21pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/2 "2024-02-14T20:21:26Z")

</div>

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

Can you post your (redacted) container config here?

---

<div class="post-metadata">

### Author: ![Oogiem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oogiem/32/363317_2.png) [@Oogiem](https://meta.discourse.org/u/Oogiem)
#### Post date: [February 14, 2024, 8:26pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/3 "2024-02-14T20:26:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 14, 2024, 8:39pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/4 "2024-02-14T20:39:48Z")

</div>

> [@Oogiem](#):
>
> And it was created 3 years ago

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.

---

<div class="post-metadata">

### Author: ![Oogiem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oogiem/32/363317_2.png) [@Oogiem](https://meta.discourse.org/u/Oogiem)
#### Post date: [February 14, 2024, 8:45pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/5 "2024-02-14T20:45:43Z")

</div>

> [@supermathie](#):
>
> your best bet here is probably to take a backup of the site

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.

---

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [February 14, 2024, 8:48pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/6 "2024-02-14T20:48:20Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Oogiem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oogiem/32/363317_2.png) [@Oogiem](https://meta.discourse.org/u/Oogiem)
#### Post date: [February 14, 2024, 8:50pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/7 "2024-02-14T20:50:28Z")

</div>

> [@Firepup650](#):
>
> `./launcher start app`

Tried that now getting 502 bad gateway issue :sigh:

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [February 14, 2024, 9:16pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/8 "2024-02-14T21:16:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Oogiem](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/oogiem/32/363317_2.png) [@Oogiem](https://meta.discourse.org/u/Oogiem)
#### Post date: [February 14, 2024, 10:46pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/9 "2024-02-14T22:46:54Z")

</div>

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 😀

---

<div class="post-metadata">

### Author: ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)
#### Post date: [February 14, 2024, 10:59pm UTC](https://meta.discourse.org/t/upgrading-very-old-discourse-get-ruby-error/295387/10 "2024-02-14T22:59:51Z")

</div>

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.
