-
Notifications
You must be signed in to change notification settings - Fork 5
Upgrade to latest 3.x Ruby #668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Also upgrade to newer bundler so ruby version can be specified in ruby file. I'm doing this primarilly because I can't run Rubocop locally due to older version of ruby being built on older versions of OpenSSL which don't accept the certificates for our remote rubocop config.
2ee9209 to
77be67f
Compare
It looks like ruby 3.4.x is no longer being built for bullseye so use a more recent debian OS. Also, python2-dev is no longer available as a package. As far as I can see python isn't used so remove it.
Copy across the .ruby-version file so bundler knows what version to use. Also --path is no longer supported so remove it.
This wasn't working correctly as it was looking for files that didn't exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Updates the application’s runtime/tooling to Ruby 3.4.8 and aligns local/CI/container environments accordingly, including upgrading Bundler to support sourcing the Ruby version from .ruby-version.
Changes:
- Bump Ruby version to 3.4.8 across
.ruby-version,.tool-versions, CircleCI, and Docker. - Update Bundler version in
Gemfile.lockand switch Gemfile Ruby declaration to read from.ruby-version. - Add explicit
base64andcsvdependencies (now treated as gems in newer Ruby setups).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| Gemfile.lock | Updates Ruby version and Bundler version; adds base64/csv dependencies. |
| Gemfile | Reads Ruby version from .ruby-version; adds base64/csv gems. |
| Dockerfile | Moves base image to Ruby 3.4.8 on Debian trixie; adjusts bundle/binstubs setup and COPY inputs. |
| .tool-versions | Updates asdf Ruby version to 3.4.8. |
| .ruby-version | Updates Ruby version file to ruby-3.4.8. |
| .circleci/config.yml | Updates CI Ruby images to 3.4 series. |
Comments suppressed due to low confidence (1)
.circleci/config.yml:8
- CI images were bumped to Ruby 3.4, but the lockfile now specifies
BUNDLED WITH 4.0.5. If thecimg/ruby:3.4*images (or theruby/install-depsorb) don’t provide Bundler 4.x by default,bundle installwill fail with a “use Bundler 4.x” error. Consider explicitly installing/pinning Bundler 4.0.5 in this job (or configuring the orb to use it) to keep CI deterministic.
docker:
- image: "cimg/ruby:3.4"
steps:
- checkout
- ruby/install-deps
- ruby/rubocop-check:
Bundler and most version managers support .tool-versions now so it's one less place to keep up to date
Suggested by Copilot, I don't think it is more secure as it already is key verified.
What's changed?
Upgrade to ruby 3.4.8 (the latest 3.x.x release)
Also upgrade to newer bundler (4.0.5) so ruby version can be specified in the .ruby-version file.
I'm doing this primarily because I can't run Rubocop locally due to older versions of ruby being built on older versions of OpenSSL which don't accept the certificates for our remote Rubocop config. There are other ways to solve this problem, but we get other benefits from being on a newer Ruby release.
Steps to perform after deploying to production
I will check this in the staging environment