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

Upgrade to Rails 7.0 with rake app:update #770

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

Conversation

Fryguy
Copy link
Member

@Fryguy Fryguy commented Jan 22, 2025

No description provided.

@@ -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"
Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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.

Copy link
Member

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.

Copy link
Member Author

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.

@Fryguy
Copy link
Member Author

Fryguy commented Jan 22, 2025

@jrafanie Please review.

@Fryguy Fryguy added the dependencies Pull requests that update a dependency file label Jan 22, 2025
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
Copy link
Member

Choose a reason for hiding this comment

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

:trollface:

# 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?
Copy link
Member

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.

Copy link
Member Author

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.

@jrafanie
Copy link
Member

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.

@Fryguy
Copy link
Member Author

Fryguy commented Jan 23, 2025

We also only have one controller and view, so it's super tiny 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants