Rails 7 & Ruby 3.1
This is what I had to do to get Rails 7 to at least migrate and start up on Ruby 3.1. Then I noticed https://github.com/theforeman/foreman/pull/9287 does a lot of the same work.
There's also a bunch of gem updates prepended to this which can be submitted separately. Split off PRs:
- https://github.com/theforeman/foreman/pull/9329
- https://github.com/theforeman/foreman/pull/9330
- https://github.com/theforeman/foreman/pull/9331
- https://github.com/theforeman/foreman/pull/9332
- https://github.com/theforeman/foreman/pull/9333
- https://github.com/theforeman/foreman/pull/9370
- https://github.com/theforeman/foreman/pull/9371
- https://github.com/theforeman/foreman/pull/9372
- https://github.com/theforeman/foreman/pull/9373
- https://github.com/theforeman/foreman/pull/9374
- https://github.com/theforeman/foreman/pull/9376
- https://github.com/theforeman/foreman/pull/9377
- https://github.com/theforeman/foreman/pull/9378
- https://github.com/theforeman/foreman/pull/9380
- https://github.com/theforeman/foreman/pull/9381
https://github.com/theforeman/foreman/pull/9382https://github.com/theforeman/foreman/pull/9748- https://github.com/theforeman/foreman/pull/9771
- https://github.com/theforeman/foreman/pull/9770
- https://github.com/theforeman/foreman/pull/10076
- https://github.com/theforeman/foreman/pull/10140
Issues: #32685
Rebased since some preparation work was merged. No real change compared to the previous version.
My plan is to submit the gem updates after branching, which would give us a much more solid base to work on. Then we can also look at the Zeitwerk changes in more detail.
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again.
If you have a remote called 'upstream' that points to this repository, you can do this by running:
$ git pull --rebase upstream develop
This message was auto-generated by Foreman's prprocessor
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again.
If you have a remote called 'upstream' that points to this repository, you can do this by running:
$ git pull --rebase upstream develop
This message was auto-generated by Foreman's prprocessor
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again.
If you have a remote called 'upstream' that points to this repository, you can do this by running:
$ git pull --rebase upstream develop
This message was auto-generated by Foreman's prprocessor
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again.
If you have a remote called 'upstream' that points to this repository, you can do this by running:
$ git pull --rebase upstream develop
This message was auto-generated by Foreman's prprocessor
@ekohl, this pull request is currently not mergeable. Please rebase against the develop branch and push again.
If you have a remote called 'upstream' that points to this repository, you can do this by running:
$ git pull --rebase upstream develop
This message was auto-generated by Foreman's prprocessor
This is still not ready for consumption, but since a lot of preparation work has been merged I've rebased this to make the PR a bit easier to grasp.
Katello needs to update:
[2022-09-28T09:51:13.727Z] Bundler could not find compatible versions for gem "railties":
[2022-09-28T09:51:13.727Z] In Gemfile:
[2022-09-28T09:51:13.727Z] katello was resolved to 4.7.0.pre.master, which depends on
[2022-09-28T09:51:13.727Z] angular-rails-templates (~> 1.1.0) was resolved to 1.1.0, which depends on
[2022-09-28T09:51:13.727Z] railties (< 7, >= 4.2)
[2022-09-28T09:51:13.727Z]
[2022-09-28T09:51:13.727Z] rails (~> 7.0.3) was resolved to 7.0.3, which depends on
[2022-09-28T09:51:13.727Z] railties (= 7.0.3)
Version 1.2 of that gem does support Rails 7.
Thank you for your contribution, @ekohl! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process.
Rebased now that the Rails 6.1 defaults work has been merged.
This now includes #9771 & #9770 but with that:
$ be rake zeitwerk:check
2023-07-07T18:37:25 [I|app|] Rails cache backend: File
2023-07-07T18:37:25 [W|app|] You are trying to replace import_subnets from . Adding allowed actions from plugin permissions to the existing one.
/home/ekohl/dev/foreman/app/models/user.rb:20: warning: already initialized constant User::ANONYMOUS_ADMIN
/home/ekohl/dev/foreman/app/models/user.rb:20: warning: previous definition of ANONYMOUS_ADMIN was here
/home/ekohl/dev/foreman/app/models/user.rb:21: warning: already initialized constant User::ANONYMOUS_API_ADMIN
/home/ekohl/dev/foreman/app/models/user.rb:21: warning: previous definition of ANONYMOUS_API_ADMIN was here
/home/ekohl/dev/foreman/app/models/user.rb:22: warning: already initialized constant User::ANONYMOUS_CONSOLE_ADMIN
/home/ekohl/dev/foreman/app/models/user.rb:22: warning: previous definition of ANONYMOUS_CONSOLE_ADMIN was here
Hold on, I am eager loading the application.
WARNING: The following directories will only be checked if you configure
them to be eager loaded:
/home/ekohl/dev/foreman/app/models/auth_sources
/home/ekohl/dev/foreman/app/models/compute_resources
/home/ekohl/dev/foreman/app/models/fact_names
/home/ekohl/dev/foreman/app/models/lookup_keys
/home/ekohl/dev/foreman/app/models/operatingsystems
/home/ekohl/dev/foreman/app/models/parameters
/home/ekohl/dev/foreman/app/models/taxonomies
/home/ekohl/dev/foreman/app/models/mail_notifications
You may verify them manually, or add them to config.eager_load_paths
in config/application.rb and run zeitwerk:check again.
Otherwise, all is good!
Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process.
Rebased to drop now irrelevant. No real changes compared to the previous one.
Thank you for your contribution! This PR has been inactive for 3 months, closing for now. Feel free to reopen when you return to it. This is an automated process.
Needs a rebase now that #9770 is merged, but I've opened https://github.com/theforeman/foreman/pull/10076 which is a part of the Zeitwerk work commit that's included here. To avoid continuously rebasing, I'm waiting for that to be merged.