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

app:update from Rails 7.1.2 to 7.1.3 creates new_framework_defaults_7_1.rb #50792

Closed
GitToTheHub opened this issue Jan 18, 2024 · 8 comments
Closed

Comments

@GitToTheHub
Copy link

Steps to reproduce

I made an update from Rails 7.1.2 to 7.1.3 by changing the rails version number to 7.1.3 in the gemfile and running bundle update. After that i ran rails app:update which produced the file config/initializers/new_framework_defaults_7_1.rb. I already have config.load_defaults 7.1 in my config/application.rb, so I think, this file shouldn't be generated?

Expected behavior

The file config/initializers/new_framework_defaults_7_1.rb should not be created, if config.load_defaults 7.1 is already present in config/application.rb.

Actual behavior

The file config/initializers/new_framework_defaults_7_1.rb is created after rails app:update, despite config.load_defaults 7.1 is already present in config/application.rb.

System configuration

Rails version: 7.1.3

Ruby version: ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x64-mingw-ucrt]

@GitToTheHub GitToTheHub changed the title app:update for Rails 7.1.2 to 7.1.3 makes new_framework_defaults_7_1.rb file app:update for Rails 7.1.2 to 7.1.3 creates new_framework_defaults_7_1.rb file Jan 18, 2024
@GitToTheHub GitToTheHub changed the title app:update for Rails 7.1.2 to 7.1.3 creates new_framework_defaults_7_1.rb file app:update from Rails 7.1.2 to 7.1.3 creates new_framework_defaults_7_1.rb Jan 18, 2024
@p8
Copy link
Member

p8 commented Jan 18, 2024

I don't think rails app:update should be run when upgrading the tiny version 7.1.2 to 7.1.3.
It just regenerates the config files for 7.1 which includes new_framework_defaults_7_1.rb, which don't change in tiny versions (but I might be mistaken).

task update: [ "update:configs", "update:bin", "update:active_storage", "update:upgrade_guide_info" ]

It's seems to be mostly typo's, of course there could be a bug fix in here.
https://github.com/rails/rails/commits/7-1-stable/railties/lib/rails/generators/rails/app/templates/config

@GitToTheHub
Copy link
Author

I was following the update guide on https://guides.rubyonrails.org/upgrading_ruby_on_rails.html, because i wanted to know, what is the right way to update rails. There was no difference made, which version i want to upgrade, when i was reading the section 1.4 The Update Task

@rails-bot
Copy link

rails-bot bot commented Apr 18, 2024

This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the 7-1-stable branch or on main, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

@rails-bot rails-bot bot added the stale label Apr 18, 2024
@rails-bot rails-bot bot closed this as completed Apr 25, 2024
@GitToTheHub
Copy link
Author

This is still an issue

@flavorjones
Copy link
Member

@GitToTheHub Would you be open to creating a pull request to the guides that clarifies the language there to not run the update task on patch version updates?

@GitToTheHub
Copy link
Author

Sure, where can I make a pr for this? Are the guides in this repo?

@flavorjones
Copy link
Member

Guides are in this repo. I think the file you would probably want to edit is https://github.com/rails/rails/blob/main/guides/source/upgrading_ruby_on_rails.md

You may want to scan Contributing to Ruby on Rails — Ruby on Rails Guides first.

@GitToTheHub
Copy link
Author

Ok thanks, i will do it :)

Greetings

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

No branches or pull requests

4 participants