# Kan Ruby niet updaten, dus ./launcher rebuild app blijft falen

**URL:** https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959
**Category:** Self-hosting
**Created:** [14 mei 2024 om 20:13 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959 "2024-05-14T20:13:22Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![robobobo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robobobo/32/385958_2.png) [@robobobo](https://meta.discourse.org/u/robobobo)
#### Post date: [14 mei 2024 om 20:13 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/1 "2024-05-14T20:13:22Z")

</div>

Hi there,

I have recently migrated a server image that has Docker Discourse installed on it

I can get everything up and running, but I need to re-issue the SSL cert

Since the old server had SSL configured, I’m following [this guide](https://meta.discourse.org/t/set-up-https-support-with-lets-encrypt/40709/414)’s suggestion and running  
`./launcher rebuild app`

This then causes docker to pull and update a bunch of things. The current image is `Discourse 2.6.0.beta3 - https://github.com/discourse/discourse version 29f7e0689f61c5d85960a88f741ac3abced12d3e`

The first time I ran it, it gave me the Postgres Upgrade message, so I ran `./launcher rebuild app` again as instructed

Now it just keeps failing every time, I believe due to this error with an insufficient version of ruby installed

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

```

Here is the full output

```plaintext
FAILED

--------------------

Pups::ExecError: cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock) failed with return #<Process::Status: pid 304 exit 1>

Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'

exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,\"\"); print $0 }' Gemfile.lock)", "find $home ! -user discourse -exec chown discourse {} \\+"]}

2ad07f29ace1b5396d9944fc4fc5a1ec712727280e8bb3df760367d08bfe6a25

**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.

```

I would have thought Docker would update the Ruby version as needed?

I have tried manually logging into the container and install RVM, and activated Ruby v3+ but I still continue to get the same error

I’m a bit lost at this stage, and wonder is the version installed just too old to be upgraded with `./launcher`?

Any advise would be greatly appreciated!

---

<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: [14 mei 2024 om 20:14 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/2 "2024-05-14T20:14:36Z")

</div>

> [@robobobo](#):
>
> Here is the full error
> 
> ```plaintext
> FAILED
> 
> --------------------
> 
> Pups::ExecError: cd /var/www/discourse && gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lock) failed with return #<Process::Status: pid 304 exit 1>
> 
> Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
> 
> exec failed with the params {"cd"=>"$home", "hook"=>"web", "cmd"=>["gem install bundler --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,\"\"); print $0 }' Gemfile.lock)", "find $home ! -user discourse -exec chown discourse {} \\+"]}
> 
> 2ad07f29ace1b5396d9944fc4fc5a1ec712727280e8bb3df760367d08bfe6a25
> 
> **FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
> 
> ```

Just a note, that is not the error, the actual errors will be further up.

---

<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: [15 mei 2024 om 06:07 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/3 "2024-05-15T06:07:09Z")

</div>

I recommend starting with a new image and doing a [standard install](https://meta.discourse.org/t/142537?silent=true).

---

<div class="post-metadata">

### Author: ![robobobo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robobobo/32/385958_2.png) [@robobobo](https://meta.discourse.org/u/robobobo)
#### Post date: [16 mei 2024 om 20:27 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/4 "2024-05-16T20:27:01Z")

</div>

Thanks Jay, I feared that might be the only way forward

I guess I just need to find a way and hope I can copy across the database so everything isn’t lost

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [17 mei 2024 om 00:27 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/5 "2024-05-17T00:27:37Z")

</div>

Try updating all your packages using apt upgrade

---

<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: [17 mei 2024 om 05:43 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/6 "2024-05-17T05:43:42Z")

</div>

It’s not hard. You can just make a backup, or do [Move a Discourse site to another VPS with rsync](https://meta.discourse.org/t/move-a-discourse-site-to-another-vps-with-rsync/43812). You have nothing to lose since your existing site stays intact. It’s the safest possible way forward.

---

<div class="post-metadata">

### Author: ![robobobo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robobobo/32/385958_2.png) [@robobobo](https://meta.discourse.org/u/robobobo)
#### Post date: [20 mei 2024 om 21:08 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/7 "2024-05-20T21:08:13Z")

</div>

I’ve updated absolutely everything I could, including the Ubuntu version of the server and confirmed I have ruby v3.1 running.

Problem is I suspect it’s the ruby version needed in the container which is controlled by docker, and I can’t seem to get it to update

---

<div class="post-metadata">

### Author: ![robobobo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robobobo/32/385958_2.png) [@robobobo](https://meta.discourse.org/u/robobobo)
#### Post date: [20 mei 2024 om 21:12 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/8 "2024-05-20T21:12:06Z")

</div>

I did manage to install a clean version and get it up and running `3.3.0.beta3-dev`

However, when I restored the backup from the old site, it doesn’t look like it’s restored correctly and now the login page doesn’t work. Looking at the JS console there’s a `Discourse is not defined` error whenever I click the login/signup buttons. I reckon because of the big difference in versions it’s not a simple recovery of a `2.6.0` backup to a clean `3.3.0` install

Moving everything to a new server just isn’t working for me, as I can’t run `./launcher rebuild app` without this ruby error blocking me each time.

---

<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: [21 mei 2024 om 12:05 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/9 "2024-05-21T12:05:07Z")

</div>

> [@robobobo](#):
>
> I reckon because of the big difference in versions it’s not a simple recovery of a `2.6.0` backup to a clean `3.3.0` install

If you’re running an upgrade that far it’s a good bet that your themes are broken. Try safe-mode.

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [21 mei 2024 om 15:20 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/10 "2024-05-21T15:20:26Z")

</div>

> [@Using Safe Mode to troubleshoot issues with themes and plugins](https://meta.discourse.org/t/use-safe-mode-to-troubleshoot-issues-with-themes-and-plugins/53504):
>
> bookmark This guide explains how to use Discourse’s [Safe Mode](https://meta.discourse.org/t/53504?silent=true) to troubleshoot issues with themes and plugins. person_raising_hand Required user level: All users Discourse offers a “JavaScript [Safe Mode](https://meta.discourse.org/t/53504?silent=true)” that allows any user to isolate the root cause of JavaScript issues caused by plugins, themes, or theme components. This feature is particularly useful for troubleshooting problems on your Discourse site. Accessing [Safe Mode](https://meta.discourse.org/t/53504?silent=true) To access [Safe Mode](https://meta.discourse.org/t/53504?silent=true), follow these steps: Open a new browse…

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [21 mei 2024 om 17:54 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/11 "2024-05-21T17:54:01Z")

</div>

> [@robobobo](#):
>
> a clean `3.3.0` install

Technically there is no `3.3.0` yet, we are still going through the betas.

---

<div class="post-metadata">

### Author: ![robobobo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robobobo/32/385958_2.png) [@robobobo](https://meta.discourse.org/u/robobobo)
#### Post date: [21 mei 2024 om 20:04 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/12 "2024-05-21T20:04:21Z")

</div>

Thanks for the info, unfortunately when I try access /safe-mode it just redirects back to the /login url again.

I think I’ll try a re-install and start again

---

<div class="post-metadata">

### Author: ![robobobo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robobobo/32/385958_2.png) [@robobobo](https://meta.discourse.org/u/robobobo)
#### Post date: [21 mei 2024 om 20:07 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/13 "2024-05-21T20:07:53Z")

</div>

I did use the [official discourse image](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md) but I guess that just installs the latest version regardless if it’s a beta. Or is there a way I can specify a stable or specific version?

---

<div class="post-metadata">

### Author: ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)
#### Post date: [21 mei 2024 om 20:22 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/14 "2024-05-21T20:22:57Z")

</div>

Yes you can. Edit app.yml on a fresh install before building discourse (since you can’t downgrade). Pick the tag from GitHub. I had to do this some time ago when I had to restore to an old version before upgrading to the latest.

> [@How would I install a certain (old) version of Discourse](https://meta.discourse.org/t/how-would-i-install-a-certain-old-version-of-discourse/166423/4):
>
> Checkout the same version of discourse\_docker that you use on your other server, maybe copy your app.yml from the old server and make the necessary changes. Also in app.yml, change the version from tests-passed to either a tag (e.g. v2.5.0.beta7) or use a git commit hash.

Now I make an image of the working version before I upgrade just case something went wrong.

---

<div class="post-metadata">

### Author: ![robobobo](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/robobobo/32/385958_2.png) [@robobobo](https://meta.discourse.org/u/robobobo)
#### Post date: [22 mei 2024 om 21:25 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/15 "2024-05-22T21:25:39Z")

</div>

Thank you, appreciate the help!

Good news is I managed to figure out how to install an older version of discourse\_docker and the same version of discourse by changing the app.yml file

Bad news is I’ve ran into yet another error close to the end of the install

```FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 14351 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]} 

```

I’ll need to dig into that a bit more, looks to be more ruby/rails related in the container itself

---

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [22 mei 2024 om 22:21 UTC](https://meta.discourse.org/t/cant-get-ruby-to-update-so-launcher-rebuild-app-keeps-failing/307959/16 "2024-05-22T22:21:43Z")

</div>

> [@robobobo](#):
>
> Thanks for the info, unfortunately when I try access /safe-mode it just redirects back to the /login url again.

Try `https://forum.example.com/login?safe_mode=no_themes%2Cno_plugins`
