Bootstrap failed: Discourse requires Ruby 2.5.2 or up


(Jay Pfaffman) #1

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?


(Stephen) #2

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


(Evgeny) #3

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. )


(Stephen) #4

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.


(Stephen) #5

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?


(Jay Pfaffman) #6

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?).


(Gerhard Schlager) #7

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.


(Stephen) #8

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:


(Jay Pfaffman) #9

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.


(Gerhard Schlager) #10

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


(Stephen) #11

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).


(Jay Pfaffman) #12

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.


(Stephen) #13

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:


#14

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


(Stephen) #15

Re-run ./launcher rebuild app

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


#16

Awesome. Thanks… that worked.