fog-openstack icon indicating copy to clipboard operation
fog-openstack copied to clipboard

Ruby 3.0 support

Open maciejpankanin opened this issue 3 years ago • 4 comments

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?

maciejpankanin avatar Mar 10 '22 07:03 maciejpankanin

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

chaadow avatar Oct 08 '22 15:10 chaadow

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

image

chaadow avatar Oct 08 '22 17:10 chaadow

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

Any chances of merging this PR and support ruby 3.0?

Thank you!

talentohq avatar May 13 '24 08:05 talentohq

@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).

geemus avatar May 13 '24 16:05 geemus