Closed chris1984 closed 3 months ago
With the switch to Ruby3 we are getting the following traceback with inventory sync:
13:07:08 rails.1 | 2024-06-13T13:07:08 [W|bac|9b31bf0e] undefined method `encode' for URI:Module (NoMethodError) 13:07:08 rails.1 | 9b31bf0e | /home/vagrant/foreman_rh_cloud/lib/foreman_inventory_upload.rb:78:in `inventory_export_url' 13:07:08 rails.1 | 9b31bf0e | /home/vagrant/foreman_rh_cloud/lib/inventory_sync/async/query_inventory_job.rb:74:in `request_url' 13:07:08 rails.1 | 9b31bf0e | /home/vagrant/foreman_rh_cloud/lib/inventory_sync/async/query_inventory_job.rb:57:in `query_inventory'
According to Stack Overflow Ruby3 got rid of URI.escape and suggest using CGI.escape https://stackoverflow.com/questions/68635238/undefined-method-encode-for-urimodule-with-gem-rspotify https://stackoverflow.com/questions/68174351/undefined-method-escape-for-urimodule
URI.escape
CGI.escape
After PR, sync runs fine.
I looked in the code and this was the only instance I could find of URI.escape
With the switch to Ruby3 we are getting the following traceback with inventory sync:
According to Stack Overflow Ruby3 got rid of
URI.escape
and suggest usingCGI.escape
https://stackoverflow.com/questions/68635238/undefined-method-encode-for-urimodule-with-gem-rspotify https://stackoverflow.com/questions/68174351/undefined-method-escape-for-urimoduleAfter PR, sync runs fine.
I looked in the code and this was the only instance I could find of
URI.escape