upgrade: ruby 4.0.2 → 4.0.3 and fix devcontainer base image#6928
Merged
upgrade: ruby 4.0.2 → 4.0.3 and fix devcontainer base image#6928
Conversation
The devcontainer base (ruby:dev-3.3-bookworm) shipped Ruby 3.3 while the project pinned 4.0.2, so bundle install failed in codespaces. Bump the base to dev-4.0-bookworm and align the project to 4.0.3 so codespace builds don't need a slow rvm compile. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bin/setup previously installed whatever bundler version was latest and then rewrote BUNDLED WITH via 'bundle update --bundler', so the lockfile silently drifted whenever a developer ran setup. Pin to 4.0.6 — the version Heroku supports for our Ruby — and drop the auto-rewrite step. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stick to versions in https://devcenter.heroku.com/articles/ruby-support-reference#supported-ruby-versions
4.0.3, Rubygems: 4.0.6
Summary
mcr.microsoft.com/devcontainers/ruby:dev-3.3-bookwormshipped Ruby 3.3 while.ruby-versionpinned 4.0.2, sobundle installrejected the system Ruby andrspec/bin/setupfailed in fresh codespaces.dev-4.0-bookworm(currently ships Ruby 4.0.3) and aligned the project from 4.0.2 → 4.0.3 across.ruby-version,.tool-versions,Gemfile,Gemfile.lock, the productionDockerfile,flake.nix, and the setup docs.if [ "$RUBY_VERSION" != "4.0.2" ]gate by giving.devcontainer/Dockerfilea conditional rvm-install step that compares the system Ruby against.ruby-version. With patches now aligned (both 4.0.3) this is a no-op — codespace rebuilds don't need a slow rvm source compile.gemset.nixwas intentionally left alone — its4.0.2is a gem version (dotenv), not Ruby.Test plan
ruby -vreports 4.0.3 and thatbundle install/bin/setup/rspecall succeed without an rvm install pass.bundle installlocally on Ruby 4.0.3 to confirmGemfile.lockstill resolves cleanly (the RUBY VERSION line was hand-edited).Dockerfileand smoke-boot the app onruby:4.0.3-alpine.ruby-4.0.3(otherwise inputs need updating).🤖 Generated with Claude Code