-
Notifications
You must be signed in to change notification settings - Fork 39
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
Upgrade to Rails 7.0 with rake app:update #770
base: master
Are you sure you want to change the base?
Conversation
@@ -1,14 +1,11 @@ | |||
source 'https://rubygems.org' | |||
|
|||
# The Ruby version should match the lowest acceptable version of the application | |||
raise "Ruby 3.1 required" unless RUBY_VERSION >= "3.1" && RUBY_VERSION < "3.2" |
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.
I dropped this because it breaks renovate - it was more about making devs run 3.1 so I removed it for now.
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.
Does ruby '~> 3.1.0'
do what you want?
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.
Does
ruby '~> 3.1.0'
do what you want?
Wait you can do the twiddle wack with the ruby command? I'll give it a try.
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.
yes, https://bundler.io/guides/gemfile_ruby.html
I think we did it this way in manageiq because we wanted a way to warn on untested rubies we wanted to allow but raise on others we explicitly do not want to run on.
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.
Of course, this option came after what we started with and it's possible it didn't have the full ~>
version constraint support at one point.
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.
No, I just added this line this past week. I tried the ruby command first, but I never thought to use ~>, so it was forcing me to use an exact z stream, and I didn't like that.
@jrafanie Please review. |
gem 'concurrent-ruby', '< 1.3.5' # Temporary pin down as concurrent-ruby 1.3.5 breaks Rails 6.1 & 7.0, and rails-core doesn't | ||
# plan to ship a new 6.1 or 7.0 to fix it. See https://github.com/rails/rails/pull/54264 | ||
gem 'rails', '~> 7.0.8', '>= 7.0.8.7' | ||
gem 'concurrent-ruby', '< 1.3.5' # Temporary pin down as concurrent-ruby 1.3.5 breaks Rails 7.0, and rails-core doesn't |
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.
# Eager loading loads your whole application. When running a single test locally, | ||
# this probably isn't necessary. It's a good idea to do in a continuous integration | ||
# system, or in some way before deploying your code. | ||
config.eager_load = ENV["CI"].present? |
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.
This is interesting. I wonder if this leads to "tests work locally but not on CI" issues.
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.
Yeah I wasn't sure about this one, but this came from the Rails defaults via app: update, so I decided to keep it. Should be easy enough to change back if it's a problem.
If this is all that's needed to get rails 7.0 upgraded, I'm super jealous. It's amazing how easy upgrades are if you don't butcher the internals of rails. |
We also only have one controller and view, so it's super tiny 😅 |
No description provided.