I’m having similar issues. This seems the same as Failed to bootstrap using import template.
And I meant not to try to upgrade that container because I’d seen this, but I tried anyway because of another strange error. . .
EDIT: I added the
su discourse -c 'bundle config unset deployment'
To the template before the
su discourse -c 'bundle install --no-deployment --path vendor/bundle --jobs 4 --without "test development"'
line and it’s working. (But, alas, didn’t solve my unrelated problem).