On one of my self-hosted Discourse, (fully up to date docker_manager and a docker image only a few weeks old ) I just ran in this error upgrading. I don’t know what version the site was on before, but it was only about 30 commits behind on tests-passed.
$ cd /var/www/discourse && git fetch && git reset --hard HEAD@{upstream}
HEAD is now at fc090b4 FIX: With many stickies some latest posts got missed
********************************************************
*** Please be patient, next steps might take a while ***
********************************************************
$ bundle install --deployment --without test --without development
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running `gem install bundler`.
How can be warned ahead of time that we need to update the container?
And, do we always need to rebuild after updating the container?
Are you sure the container is out of date or if it’s Bundler having added “BUNDLED WITH” to the lock file?
I can’t find the discussion now, but AFAIK this was causing grief and it no longer does this.
$ bundle install --deployment --without test --without development
Warning: the running version of Bundler is older than the version that created the lockfile. We suggest you upgrade to the latest version of Bundler by running gem install bundler.
But even if it’s just bundler being annoying… I bet this is something the discourse team can make less confusing.
One of my communities is 189 commits behind at the moment, I don’t see any notice that my container is out of date, but I don’t have any confidence that that bundler in use matches what’s current, or if it even matters.
Currently, I won’t know until I hit Upgrade, and get a warning. Then if I do, I’ll have to re-upgrade at the command line.
How are we supposed to predict what’s going to happen when I click Upgrade?
You won’t see one at the moment because the BUNDLED WITH in the Gemfile.lockgot missing again (cc @eviltrout)
No, it doesn’t matter when you are using the Docker container. It’s just an annoyance during development when there’s a version mismatch, but you can completely ignore it in production.
So, there’s no need to worry about Bundler when you click on Upgrade.