Skip to content
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

Specify maximum compatible Ruby version for Rails 5 #47961

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chris-hewitt
Copy link
Contributor

This is important to note because the section goes on to say "Upgrade to the latest Ruby you can first, and then upgrade Rails."

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Changes that are unrelated should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]

@rails-bot rails-bot bot added the docs label Apr 17, 2023
@@ -22,7 +22,7 @@ Rails generally stays close to the latest released Ruby version when it's releas

* Rails 7 requires Ruby 2.7.0 or newer.
* Rails 6 requires Ruby 2.5.0 or newer.
* Rails 5 requires Ruby 2.2.2 or newer.
* Rails 5 requires Ruby 2.2.2 through 2.6.10.
Copy link
Member

Choose a reason for hiding this comment

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

I think we should just remove this line instead of updating it, Rails 5 is no longer supported.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the document that describes how to move to a supported version. See https://guides.rubyonrails.org/upgrading_ruby_on_rails.html#upgrading-from-rails-5-2-to-rails-6-0

@matthewd
Copy link
Member

cc #47811, including some consideration of ways to maintain this info outside the main repo, to side step the problem that the max Ruby version is only really defined after the Rails version ceases to be supported.

(It's also not quite this easy to define the max version: all of Rails 5.* is compatible with Ruby 2.2, but I doubt all of those work with Ruby 2.6.)

@chris-hewitt
Copy link
Contributor Author

Agreed. I think somehow, though, the guide should describe what steps to take and in what order. Sections 1.2 and 1.3 almost get us there, except (currently) for the case of upgrading to Rails 6. In that case the "latest Ruby you can" instruction needs a caveat, so users don't waste time upgrading to Ruby 2.7/3.0/etc, only to get a Rails error.

@zzak
Copy link
Member

zzak commented Apr 26, 2023

This is not necessarily a comment on this PR specifically, but I think that upgrading guide could be split into multiple separate pages, per upgrade path, with the base page talking about overview concepts and links to all of the guides IMO.

@p8
Copy link
Member

p8 commented May 17, 2023

A duplicate of this PR got merged.
Not sure this can be closed, as there is still some discussion going on.

@zzak
Copy link
Member

zzak commented May 18, 2023

Whoops, yeah I saw the other PR and forgot, it's been reverted. 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants