Bootstrap failed: Discourse requires Ruby 2.5.2 or up

I just did a ./launcher bootstrap and it failed like this:

I, [2018-11-09T17:01:03.399311 #16]  INFO -- : > cd /var/www/discourse && su discourse -c 'bundle exec rake db:migrate'                                  
Discourse requires Ruby 2.5.2 or up                                                                                                                      
I, [2018-11-09T17:01:03.762531 #16]  INFO -- :                                                                                                           

Edit: if this happens to you just rebuild again and you’ll be fine. The following discussion is not important to you.
Hmm. I thought that ./launcher did a git pull, but just after my rebuild failed, I did a git pull and there were some updates. And this time the bootstrap worked.

Looking at the code, it looks like launcher should be doing a git pull. Either I just had exceptionally bad luck or we shouldn’t be telling people not to do the good ole git pull before a rebuild?


It does, that shouldn’t harm or affect the rebuild doing another though?

I had a similar, rebuilding. But I went directly to the server and saw that the version is outdated.

After the update ruby ​​(I had the old one) everything is fine! Although it was an unexpected surprise. )

1 Like

I’m going to test rebuilding one of my servers in the hope I can catch the same error.

Looking at the output of launcher rebuild app though I get the impression that the launcher is checked up to date against git, whereas git pull is going to check everything except plugins, which are handled later separately. We probably need one of the team to chip in here to confirm the precise behavior.

1 Like

Frustratingly(?) the rebuilds succeeded - just to confirm this was an install from the standard install guide, not a development install or anything else?

It was my oldest server, but checking ruby -v once it came back up it was already running 2.5.2p104. As that build is only three weeks old I have to assume that the build took care of the update - so maybe something related changed between your rebuild and mine?

How long since the last rebuild? How old is the box?

Standard install (albeit 2 container). It’s been up for a year or two. The site owner updates continually from the web interface and pings me when it fails.

This is the third time I’ve one a rebuild from the command line in recent memory (a month?).

The base image used by launcher was updated 10 days ago.

Yes, launcher does a git pull, but unless I missed something during my quick glance at the script, it doesn’t restart itself after the pull. So, it doesn’t use the new base image until the next run.


Well there we go - so for now it’s still beneficial to git pull until launcher can be tweaked to restart, or recognise the change and exit, prompting the user to re-run?

I’ve recently stopped using git pull beforehand after Jeff pointed out it wasn’t necessary - I feel vindicated! :smiley:


I always wondered about that; I thought that perhaps it was somehow restarting in some magic way. So even though it does a git pull it’s still a good idea to do a git pull before doing a rebuild. Or to always do two rebuilds.

Yeah. I think that’d be a easy enough change. If the pull did anything then stop and tell the user to restart.

1 Like

Nah, that would be annoying. It should do this only when the launcher script itself changed.

To be fair it’s more annoying when something like ruby changes and it exits with that kind of error.

If launcher can’t restart itself it’s much easier to have a message asking you to re-run than get 75% through a build (time) and have it throw a loop over a prereq with a seemingly unrelated error (user confusion).


The good news is that the git pull is at the very beginning, so you’d probably notice before you went to get a cup of coffee for the rebuild.

1 Like

For me the real good news is that by git pulling all this time I’ve been inadvertently avoiding a deficiency in the launcher, and saving myself other headaches :smiley:


So whats the fix for this? I just tried the updated and it failed with this message.

Re-run ./launcher rebuild app

No harm in doing a git pull, but not necessary if you already hit the issue.


Awesome. Thanks… that worked.

1 Like

i needed a manual ruby update to 2.5.3 on my debian wheezy, described here:

1 Like

No, you just needed to do a git pull before the rebuild, but ./launcher does the pull, I think, so if you’d just rebuilt again it would have worked. The Ruby in question is inside the container. The Ruby in your Debian doesn’t matter.