-
Notifications
You must be signed in to change notification settings - Fork 97
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
undefined method `encode' for URI:Module #588
Comments
Thanks for the report. This cropped up in Fedora after the switch from Ruby 2.7.2 to 3.0.0. The |
Using |
Frustratingly, the Ruby standard library nowadays only has What we actually need is slightly unusual: the code wants to accept maildir and mbox source URIs where the user has put URI-incompatible characters in the path and fix it up for them. So:
Some of this code for handling source URIs is a bit of a mess, with paths flying around sometimes percent-encoded and sometimes not percent-encoded. There are even comments complaining about how messy it is... But anyway, in the interest of preserving the existing behaviour I think the best option is to replace |
These methods were removed in Ruby 3.0. Fixes sup-heliotrope#588.
There is a related error in sup-add:
|
These methods were removed in Ruby 3.0. Fixes sup-heliotrope#588.
This method was also removed in Ruby 3.0. We can't use the new Source.encode_path_for_uri helper method here, because sup-add expects a complete URI, not just a path. That method will wrongly escape the colon in the URI scheme. The simplest fix is to just remove the URI encoding and parsing here entirely, and leave that until later when sup loads the sources. Fixes sup-heliotrope#588.
These methods were removed in Ruby 3.0. Fixes #588.
This method was also removed in Ruby 3.0. We can't use the new Source.encode_path_for_uri helper method here, because sup-add expects a complete URI, not just a path. That method will wrongly escape the colon in the URI scheme. The simplest fix is to just remove the URI encoding and parsing here entirely, and leave that until later when sup loads the sources. Fixes #588.
There seems to be a problem with the URI module.
I'm on manjaro linux with ruby 2.7.2p137
content of
exception-log.txt
:The text was updated successfully, but these errors were encountered: