-
Notifications
You must be signed in to change notification settings - Fork 74
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
[WIP] Upgrade to Ruby 3.3 #3864
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The issue was caused by `draper` gem upgrade (which was a result of upgrading Ruby to v3). The issue was here: https://github.com/drapergem/draper/blob/v4.0.2/lib/draper/automatic_delegation.rb#L10-L26 In decorators we delegate all methods to the decorated object. But this version of the library only does that when there is no private method with the same name on the decorator. In this case, as `admin_user` was a private method on AccountDecorator, draper tried to call `admin_user `on superclass, but it was not there, so it was failing with: ``` ActionView::Template::Error (super: no superclass method `admin_user' for #<AccountDecorator:0x00007f8784266d18 @object=#<Account id: 11, org_name: "Testing" ...> Did you mean? admin_user_email): ``` Removing it from `private_methods` fixed the issue.
This test caused multiple tests fail with: ``` ThreadError: deadlock; lock already owned by another fiber belonging to the same thread ``` This is fixed in Rails 7.0.6 and higher: rails/rails#46553
``` DEPRECATION WARNING: Passing a path to `fixture_file_upload` relative to `fixture_path` is deprecated. In Rails 7.0, the path needs to be relative to `file_fixture_path`. Please modify the call from `fixture_file_upload("wide.jpg")` to `fixture_file_upload("../../../test/fixtures/wide.jpg")`. (called from block (4 levels) in <main> at /home/dmayorov/Projects/3scale/porta/spec/acceptance/api/cms_file_spec.rb:24) ```
It used to be a default gem in Ruby 2.7, but since Ruby 3 it's not default anymore
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was an experiment to see whether it could replace #3847 easily, but it turned out to be more effort than I was hoping for...
Some of the errors I saw and tried to fix:
The fix is to upgrade
css_parser
to version 1.15.0 or higher: https://github.com/premailer/css_parser/blob/4fc5b070fb13f739eadbb27a4c5957f1713f12c6/CHANGELOG.md?plain=1#L27It's reported here but looks like it doesn't have a fix.
The reason is that
File.exists?
was removed in Ruby 3.2, now onlyFile.exist?
is available: https://www.ruby-lang.org/en/news/2022/12/25/ruby-3-2-0-released/The workaround (althout ugly) I applied was
Related issue: https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/6143
Solved by upgrading pry dependencies:
bundle update pry-shell pry-byebug pry
Then finally the server started and the admin portal apparently was working, but on trying to load the dev portal:
Related issues:
Shopify/liquid#1625
Shopify/liquid#1268
The solution is to upgrade
liquid
to5.0.0
. But it caused another issue:This is where I decided to stop 🙃 We'll upgrade in another step.