Skip to content

[Ruby] Ruby 2.7 is now the minimum (dropping Ruby 2.6)#29779

Merged
iBotPeaches merged 25 commits into
fastlane:masterfrom
iBotPeaches:drop-ruby_2.6
Jan 25, 2026
Merged

[Ruby] Ruby 2.7 is now the minimum (dropping Ruby 2.6)#29779
iBotPeaches merged 25 commits into
fastlane:masterfrom
iBotPeaches:drop-ruby_2.6

Conversation

@iBotPeaches

@iBotPeaches iBotPeaches commented Nov 25, 2025

Copy link
Copy Markdown
Member

Motivation and Context

Ruby 2.6 has been end-of-lifed 3 years and 8 months ago on March 31, 2022.

Testing has been broken against Ruby 2.6 / Ruby 2.7 for awhile, but is being restored in #29777. We are facing deprecations on a variety of dependencies and supporting an almost 4 year old version of Ruby is painful.

Spawned from previous work of @lacostej on #21685

Description

  • Dependabot can no longer upgrade deps. They dropped support for Ruby 2 entirely. This gets us closer to Ruby 3 as min.
  • Ruby has been deprecated on the Mac platform since 2019.
  • Ruby 2.6 has reached end of life since March 2022 and is probably insecure to use

closes: #21685

@lacostej

lacostej commented Dec 3, 2025

Copy link
Copy Markdown
Collaborator

Happy to see this land one day :)

@iBotPeaches iBotPeaches marked this pull request as ready for review December 30, 2025 12:58
@iBotPeaches iBotPeaches requested a review from Copilot December 30, 2025 12:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the minimum required Ruby version from 2.6 to 2.7, removing compatibility code for older Ruby versions and updating dependency constraints. Ruby 2.6 reached end-of-life in March 2022, and maintaining support for it has become problematic with modern tooling like Dependabot no longer supporting Ruby 2.x.

Key changes:

  • Minimum Ruby version updated to 2.7.0 across gemspec files, version checks, and RuboCop configuration
  • Simplified YAML.safe_load and ERB.new calls by removing Ruby 2.5/2.6 compatibility branches
  • Updated dependency constraints to remove Ruby 2.6-specific version pins for fakefs, ox, and domain_name

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
bin/fastlane Updated Ruby version check from 2.0.0 to 2.7.0 minimum
fastlane.gemspec Updated required_ruby_version to >= 2.7 and adjusted google-cloud-env constraint
fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb Updated template's required_ruby_version to >= 2.7
fastlane/lib/fastlane/erb_template_helper.rb Removed Ruby 2.6 compatibility branch for ERB.new, using keyword arguments only
spaceship/lib/spaceship/spaceauth_runner.rb Removed Ruby 2.5 compatibility branch for YAML.safe_load, using keyword arguments only
Rakefile Updated YAML.safe_load call to use keyword arguments with aliases parameter
Gemfile Removed Ruby 2.6 constraint comments and version pins for fakefs, ox, and domain_name
Gemfile.lock Reflects updated dependencies after removing Ruby 2.6 constraints
.rubocop.yml Updated TargetRubyVersion from 2.6 to 2.7
.circleci/config.yml Removed Ubuntu Ruby 2.6 test job from CI workflow

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread fastlane.gemspec

@taquitos taquitos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Comment thread Gemfile Outdated
@lacostej

lacostej commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

The reason we kept 2.6 is because is comes by default on Mac.

2.7, 3.0 and 3.1 are already deprecated. And if we force people to upgrade, should we just ask them to use at least 3.2?

@iBotPeaches

Copy link
Copy Markdown
Member Author

How do you feel about like updating docs saying 3.2+ preferred, anything else is deprecated. We cut one more release with 2.6 support, then do dropping of 2.7, 3.0, and 3.1.

We'd be following supported Ruby versions at that point and once you bite bullet of 2.6 (pre-installed) - the rest are easier to drop.

@lacostej

lacostej commented Jan 5, 2026

Copy link
Copy Markdown
Collaborator

Best to do it staged, yes.

We can also prepare the drop of everything below 3.3 by end of March when 3.2 is dropped. That gives people ample time to get ready. We could even make it a warning message displayed in fastlane for those who regularly update fastlane, they would be the ones to be affected the most I guess. Maybe display it last in the console, easy to spot.

The EOL ruby data seems to be here https://github.com/ruby/www.ruby-lang.org/blob/master/_data/branches.yml

@iBotPeaches

Copy link
Copy Markdown
Member Author

Ah good idea! Let me work a PR to emit a message (with an ENV to disable it) for unsupported Rubys and get some team buy-in on that.

@iBotPeaches

Copy link
Copy Markdown
Member Author

PR up for a new feature to emit a message in output if running an unsupported Ruby version - #29840

@iBotPeaches iBotPeaches merged commit 005c887 into fastlane:master Jan 25, 2026
9 checks passed

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @iBotPeaches 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a month, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀"

@iBotPeaches iBotPeaches deleted the drop-ruby_2.6 branch January 25, 2026 21:05
@lacostej

Copy link
Copy Markdown
Collaborator

Ran my issue stats script updated for 2025 til now

> seq 29200 29880 | xargs -L1 -I % gh issue view % | grep '| Ruby                        |' | cut -d '|' -f 3 >> RUBIES   
> ruby -e 'puts File.read("RUBIES").split("\n").map{|l|l.strip.split(".")[0..1].join(".")}.group_by{|l| l}.map{|a| [a[0],a[1].count]}.to_h' 
{"3.2" => 16, "3.3" => 20, "3.1" => 4, "3.4" => 37, "2.7" => 5, "3.0" => 3, "2.6" => 5, "4.0" => 3}

So respectively 5 and 3 issues reported on ruby 2.6 and 2.7 out of 93 issues. Few active reporters whose issues had the ruby version are using ruby 3.0 and 3.1 either. 76 / 93 using 3.2 or later.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations! 🎉 This was released as part of fastlane 2.232.0 🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants