Feature #29914
closedMigrate to Rails 6.1 with Zeitwerk autoloading
0%
Files
Related issues
Updated by Go MAEDA about 6 years ago
- Related to Defect #27780: Case-insensitive matching fails for Unicode filenames when referring to attachments in text formatting added
Updated by Marius BĂLTEANU over 5 years ago
- Related to Feature #31128: Drop Ruby < 2.5 support added
Updated by Go MAEDA over 5 years ago
- Target version changed from Unplanned backlogs to 5.0.0
Updated by Enziin System over 5 years ago
Rails 6?
Please carefully, because Rails 6 drop sprockets assets and use Webpack default.
In the wonderland, Redmine converts to the frontend with Angular/Reactjs/Vue, it's my dream.
Updated by Go MAEDA over 5 years ago
- Blocked by Patch #31919: Update roadie-rails gem (~> 2.1.0) added
Updated by Marius BĂLTEANU over 5 years ago
Updated by Tigergm Wu almost 5 years ago
Yes. I hope so.
Enziin System wrote:
Rails 6?
Please carefully, because Rails 6 drop sprockets assets and use Webpack default.
In the wonderland, Redmine converts to the frontend with Angular/Reactjs/Vue, it's my dream.
Updated by Go MAEDA almost 5 years ago
- Related to Defect #32885: Rails 6: DEPRECATION WARNING: Single arity template handlers are deprecated added
Updated by Go MAEDA almost 5 years ago
- Related to Patch #32886: Rails 6: Use #media_type instead of #content_type to test the MIME type of a response added
Updated by Go MAEDA almost 5 years ago
- Related to Patch #32887: Rails 6: Use "render template:" instead of "render file:" in app/views/layouts/admin.html.erb added
Updated by Go MAEDA almost 5 years ago
- File 32886-wip-r19467.patch 32886-wip-r19467.patch added
I started work on this issue.
Here is the very first version of the work-in-progress patch but there are still many errors.
4936 runs, 22346 assertions, 34 failures, 42 errors, 7 skips
Please feel free to update the patch. Your help is highly appreciated!
Updated by Marius BĂLTEANU almost 5 years ago
Go MAEDA wrote:
I started work on this issue.
Here is the very first version of the work-in-progress patch but there are still many errors.
[...]
Please feel free to update the patch. Your help is highly appreciated!
I'm willing to help with this, but I think we should have first a decision (from Jean-Philippe, I guess) regarding next Redmine major version. If we're going to update to Rails 6, we should merge version 4.2.0 to 5.0.0.
Considering the time frame of the major releases, I'm in favour of Redmine 5.0.0 with support for Rails 6.
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32897: Rails 6: Pass `case_sensitive: true` option explicitly to the uniqueness validator added
Updated by Go MAEDA almost 5 years ago
Marius BALTEANU wrote:
I'm willing to help with this, but I think we should have first a decision (from Jean-Philippe, I guess) regarding next Redmine major version. If we're going to update to Rails 6, we should merge version 4.2.0 to 5.0.0.
I agree. Redmine 5.0.0 is the appropriate version to switch to Rails 6 and this should be decided by Jean-Philippe Lang.
But while waiting for Jean-Philippe's decision, we can prepare for moving to Rails 6. And I think we should do it to quickly switch to Rails 6 once JPL decided to do.
I think we should move to Rails 6 as soon as we can because the Rails team no longer provides bug fixes for Rails 5.2 except for security fixes. The negative impacts of that are already happening. For example, Redmine does not support Ruby 2.7 because Rails 5.2 does not. And probably Rails 5.2 will never support 2.7.
So, I think we should prepare for Rails 6 in parallel with waiting for the decision.
Updated by Aleksandar Pavic almost 5 years ago
+1 however I guess lot's of plugin developers will need to be notified and start their upgrades as well...
Updated by Marius BĂLTEANU almost 5 years ago
Go MAEDA wrote:
I agree. Redmine 5.0.0 is the appropriate version to switch to Rails 6 and this should be decided by Jean-Philippe Lang.
But while waiting for Jean-Philippe's decision, we can prepare for moving to Rails 6. And I think we should do it to quickly switch to Rails 6 once JPL decided to do.
I think we should move to Rails 6 as soon as we can because the Rails team no longer provides bug fixes for Rails 5.2 except for security fixes. The negative impacts of that are already happening. For example, Redmine does not support Ruby 2.7 because Rails 5.2 does not. And probably Rails 5.2 will never support 2.7.
So, I think we should prepare for Rails 6 in parallel with waiting for the decision.
Let's do it then. I've prepared this branch on my Gitlab CI instance, it should be easier to track the test fails.
As next steps, I propose to open issues for all fails and deprecation warnings and to discuss there the fixes. I expect to get some feedback from other active contributors.
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32908: Rails 6: Sending mail with DeliveryJob is deprecated added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Patch #32909: Replace pluck().first with pick() added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32910: Rails 6: add lookup_context to hook_test.rb added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Patch #32911: Rails 6: Fix deprecation warning "Class level methods will no longer inherit scoping" added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32912: Rails 6: update no longer bypass optimistic locking added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32913: Rails 6: add filename header added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32914: Rails 6: remove #filename_for_content_disposition for MS browsers added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Patch #32922: Reload detached attachments added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32923: Rails 6: detach attachments when a conflict occurs added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32921: Rails 6: add header=present to csv tests added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32935: Rails 6: fix set role_ids added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32936: Rails 6: disable AJ test adapter for integration tests added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Patch #32937: test_revisions_latin_1_identifier should be skipped on Windows added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Feature #32938: Rails 6: Zeitwerk support added
Updated by Marius BĂLTEANU almost 5 years ago
- Related to Defect #32939: Rails 6: fix plugin migrations added
Updated by Go MAEDA about 4 years ago
- Related to deleted (Defect #27780: Case-insensitive matching fails for Unicode filenames when referring to attachments in text formatting)
Updated by Petr Pospisil about 4 years ago
Hello all,
I would like to offer you our help to speed up migration to Rails 6. If you are interested in, please contact me. I have several experienced Redmine developers that should help to move Redmine forward. We can setup a plan and deliver issues done. I know we can send a patch, but I am talking about closer cooperation.
Thank you
Petr
Updated by Marius BĂLTEANU over 3 years ago
- Related to Defect #34980: Fix "undefined method `represent_boolean_as_integer=' for nil:NilClass" in Rails 6.1 added
Updated by Marius BĂLTEANU over 3 years ago
- Related to Defect #34985: Rails 6.1 replace ActiveModel::Errors #<< with #add added
Updated by Marius BĂLTEANU over 3 years ago
- Related to Defect #34984: Rails 6.1 Rendering actions with '.' in the name is deprecated added
Updated by Marius BĂLTEANU over 3 years ago
- File 0010-Fix-ArgumentError-wrong-number-of-arguments-given-1-.patch 0010-Fix-ArgumentError-wrong-number-of-arguments-given-1-.patch added
- File 0009-Fix-ArgumentError-wrong-number-of-arguments-given-1-.patch 0009-Fix-ArgumentError-wrong-number-of-arguments-given-1-.patch added
- File 0008-Rails-6.1-add-header-present-to-csv-tests-29914-3292.patch 0008-Rails-6.1-add-header-present-to-csv-tests-29914-3292.patch added
- File 0007-Fix-ActionView-Template-Error-wrong-number-of-argume.patch 0007-Fix-ActionView-Template-Error-wrong-number-of-argume.patch added
- File 0006-Fix-DEPRECATION-WARNING-Passing-a-path-to-relative-t.patch 0006-Fix-DEPRECATION-WARNING-Passing-a-path-to-relative-t.patch added
- File 0005-Fix-ActiveRecord-StaleObjectError-Attempted-to-updat.patch 0005-Fix-ActiveRecord-StaleObjectError-Attempted-to-updat.patch added
- File 0004-Fix-Subclasses-must-implement-a-find_templates-name-.patch 0004-Fix-Subclasses-must-implement-a-find_templates-name-.patch added
- File 0003-Fix-sending-mail-with-DeliveryJob-is-deprecated-2991.patch 0003-Fix-sending-mail-with-DeliveryJob-is-deprecated-2991.patch added
- File 0002-Fix-undefined-method-for-nil-NilClass-in-Rails-6.1-2.patch 0002-Fix-undefined-method-for-nil-NilClass-in-Rails-6.1-2.patch added
- File 0001-Fix-DEPRECATION-WARNING-Uniqueness-validator-will-no.patch 0001-Fix-DEPRECATION-WARNING-Uniqueness-validator-will-no.patch added
I'm attaching a patch series (19) that updates Rails to 6.1.3.1 and fixes all the tests on MySQL and PostgreSQL. MS SQL support is broken for now because the gem supports only Rails 6.0, but I'm confident that will be fixed in the following weeks (there are active discussions/PRs).
My proposal is to have these patches committed as soon as possible in order to have enough time to catch and fix other issues caused by this update (this apply also for plugin developers) and to discuss the other improvements that Rails 6.0/6.1 are adding. In the meanwhile, to track the changes easily, I've changed from Patch to Defect all those tickets that are a must for this update (and for which we have patches attached here).
Thanks again Pavel Rosický for you work on this!
Updated by Marius BĂLTEANU over 3 years ago
- File 0019-Update-activerecord-sqlserver-adapter-to-6.0.1.patch 0019-Update-activerecord-sqlserver-adapter-to-6.0.1.patch added
- File 0018-Rails-6.1-fix-set-roleids-29914-32935.patch 0018-Rails-6.1-fix-set-roleids-29914-32935.patch added
- File 0017-Fix-DEPRECATION-WARNING-Calling-to-an-ActiveModel-Er.patch 0017-Fix-DEPRECATION-WARNING-Calling-to-an-ActiveModel-Er.patch added
- File 0016-Fix-DEPRECATION-WARNING-Rendering-actions-with-.-in-.patch 0016-Fix-DEPRECATION-WARNING-Rendering-actions-with-.-in-.patch added
- File 0015-Fix-detach-attachments-when-a-conflict-occurs-29914-.patch 0015-Fix-detach-attachments-when-a-conflict-occurs-29914-.patch added
- File 0014-Disable-TestAdapter-on-IntegrationTest-29914-32936.patch 0014-Disable-TestAdapter-on-IntegrationTest-29914-32936.patch added
- File 0013-Remove-filename_for_content_disposition-for-MS-brows.patch 0013-Remove-filename_for_content_disposition-for-MS-brows.patch added
- File 0012-Add-filename-header-29914-32913.patch 0012-Add-filename-header-29914-32913.patch added
- File 0011-Use-media_type-to-get-the-MIME-type-of-the-request-2.patch 0011-Use-media_type-to-get-the-MIME-type-of-the-request-2.patch added
Batch 2.
Updated by Go MAEDA over 3 years ago
Thank you all for working on this.
Marius BALTEANU wrote:
My proposal is to have these patches committed as soon as possible in order to have enough time to catch and fix other issues caused by this update (this apply also for plugin developers) and to discuss the other improvements that Rails 6.0/6.1 are adding.
I agree. Support for Rails 5.2 will end when Rails 7.0 is released (maybe this year?). So we need to migrate to Rails 6 as soon as possible.
I will commit the patches contributed by Pavel Rosický and Marius BALTEANU in the coming days.
Updated by Marius BĂLTEANU over 3 years ago
- Subject changed from Migrate to Rails 6 to Migrate to Rails 6.1
Updated by Marius BĂLTEANU over 3 years ago
- Related to Feature #34987: Rails 6.1 destroy async added
Updated by Go MAEDA over 3 years ago
- Blocks Feature #34992: Ruby 3.0 support added
Updated by Go MAEDA over 3 years ago
The following error was reported while running the test suite.
Failure: RepositoriesSubversionControllerTest#test_entry_download [/Users/maeda/redmines/trunk/test/functional/repositories_subversion_controller_test.rb:332]: --- expected +++ actual @@ -1 +1 @@ -"attachment; filename=\"helloworld.c\"" +"attachment; filename=\"helloworld.c\"; filename*=UTF-8''helloworld.c" rails test test/functional/repositories_subversion_controller_test.rb:318
Updated by Go MAEDA over 3 years ago
Go MAEDA wrote:
The following error was reported while running the test suite.
[...]
I will fix RepositoriesSubversionControllerTest#test_entry_download
when I commit 0012-Add-filename-header-29914-32913.patch
Updated by Go MAEDA over 3 years ago
Committed 19 patches attached to #29914#note-38 and #29914#note-39 (r20879 .. r20901).
Updated by Yuichi HARADA over 3 years ago
Updating activerecord-sqlserver-adapter with r20900, but when I execute bundle update
, the following error occurs.
% bundle update Fetching gem metadata from https://rubygems.org/.......... Resolving dependencies... Bundler could not find compatible versions for gem "activerecord": In Gemfile: activerecord-sqlserver-adapter (~> 6.0.1) was resolved to 6.0.1, which depends on activerecord (~> 6.0.0) rails (= 6.1.3.1) was resolved to 6.1.3.1, which depends on activerecord (= 6.1.3.1)
Updated by Pavel Rosický over 3 years ago
優一 内田 activerecord-sqlserver-adapter doesn't support Rails 6.1 yet, but there's an open PR
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/861
it would be nice if someone could run tests on it.
Updated by Yuichi HARADA over 3 years ago
Pavel Rosický wrote:
優一 内田 activerecord-sqlserver-adapter doesn't support Rails 6.1 yet, but there's an open PR
https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/861it would be nice if someone could run tests on it.
Thank you for teaching me. I hope it will be resolved by the time Redmine 5.0 is released.
Updated by Marius BĂLTEANU over 3 years ago
- Related to Defect #35002: Fix MS SQL on Rails 6.1 added
Updated by Marius BĂLTEANU over 3 years ago
I've created #35002 to track the compatibility with MS SQL.
Updated by Marius BĂLTEANU over 3 years ago
- Related to Defect #35003: Update Rails UJS added
Updated by Go MAEDA over 3 years ago
- Related to Defect #35004: DEPRECATION WARNING during startup added
Updated by Go MAEDA over 3 years ago
- Related to Defect #35005: RuntimeError "Couldn't find Active Storage configuration" is raised at startup added
Updated by Marius BĂLTEANU over 3 years ago
We should update Rubocop TargetRailsVersion to 6.1
Updated by Go MAEDA over 3 years ago
Updated by Go MAEDA over 3 years ago
- Related to Patch #35081: Update config/environments/*.rb for Rails 6.1 added
Updated by Go MAEDA over 3 years ago
- Related to Patch #35466: Rename test/fixtures/configuration/*.yml.example to test/fixtures/files/configuration/*.yml added
Updated by Marius BĂLTEANU about 3 years ago
- Subject changed from Migrate to Rails 6.1 to Migrate to Rails 6.1 with Zeitwerk autoloading
- Assignee set to Go MAEDA
- Resolution set to Fixed
Now that we switched to Zeitwerk autoloader (#32938), we can consider the migration to Rails 6.1 completed.
Thanks again for all the help!
Updated by Marius BĂLTEANU about 3 years ago
- Related to Defect #36218: Plugin assets are not copied correctly in trunk r21289 added
Updated by Go MAEDA almost 3 years ago
Updated Rails to 6.1.4.3 in r21315.
Rails 6.1.4.2 fixes CVE-2021-44528. 6.1.4.3 fixes a bug that exists only in 6.1.4.2.
https://weblog.rubyonrails.org/2021/12/14/Rails-6-0-4-2-6-1-4-2-and-7-0-0-rc2-have-been-released/
https://weblog.rubyonrails.org/2021/12/14/Rails-6-0-4-3-6-1-4-3-and-7-0-0-rc3-have-been-released/
Updated by Go MAEDA almost 3 years ago
Updated Rails to 6.1.4.4 in r21316.
https://weblog.rubyonrails.org/2021/12/15/Rails-6-0-4-4-and-6-1-4-4-have-been-released/
Updated by Go MAEDA almost 2 years ago
- Related to Defect #36273: Modifying the source code of a plugin does not reload it after r21295 added