fog / fog-openstack

Fog for OpenStack Platform
MIT License
67 stars 130 forks source link

Ruby 3.0 support #522

Open maciejpankanin opened 2 years ago

maciejpankanin commented 2 years ago

Recently I bumped ruby to 3.0 and received this error:

NoMethodError: undefined method `encode' for URI:Module
  from fog-openstack (1.0.11) lib/fog/openstack/storage/requests/delete_multiple_objects.rb:48:in `block in delete_multiple_objects'
  from fog-openstack (1.0.11) lib/fog/openstack/storage/requests/delete_multiple_objects.rb:46:in `map'
  from fog-openstack (1.0.11) lib/fog/openstack/storage/requests/delete_multiple_objects.rb:46:in `delete_multiple_objects'
  from activestorage-openstack (1.5.2) lib/active_storage/service/open_stack_service.rb:78:in `block in delete_prefixed'
  [...]

URI.escape (URI.encode is an alias) was already obsolete in ruby 2.7 and removed in 3.0.

Are there chances this will be fixed?

chaadow commented 1 year ago

@maciejpankanin i'll make a temporary workaround on https://github.com/chaadow/activestorage-openstack

chaadow commented 1 year ago

@maciejpankanin released in v1.6.0 and opened a PR #527. So until they merge it, you can try this workaround.

image
talentohq commented 2 months ago

@dhague, @Ladas, @seanhandley, @mdarby @jjasghar.

Any chances of merging this PR and support ruby 3.0?

Thank you!

geemus commented 2 months ago

@talentohq I'd be happy to discuss and try to work on a fix, but I'm not sure if we can use that PR as is or if we'll need to do some more work. I've added a comment there and would welcome insights (as I'm not an active user of openstack myself).