Sometimes applications are using both right_aws AND aws-s3. This is notably true with the paper_clip gem, which is relying on aws-s3.
Both right_http_connection and aws-s3 do a few tricks with Net::HTTP. My patch will rescue an error where send_request_with_body_stream is potentially redefined by aws-s3. Their version only takes 4 arguments, as opposed to your 5.
fix issue where user is potentially using both aws-s3 and net_http_co…
A better solution probably would be to omit send_only argument if it is equal to the default. This assumes that the patches can in fact be applied in either order, which is not necessarily the case: http://rightaws.rubyforge.org/right_aws_gem_doc/files/README_txt.html, search for "‘incompatible Net::HTTP monkey-patch‘ ".
I think this issue and #4 are fixable by adding a new method with 5 arguments instead of the current approach of changing the signature of an existing method to take 5 arguments instead of 4. Reading right_aws, aws-s3 and rest-client source it seems to me that all three could coexist if right_aws patched Net::HTTP more carefully.
Oh, I had no idea that send_request_with_body_stream was a private method in Net::HTTP! Why would right_aws chagne its method signature? That seems bad! Very bad! No wonder things are breaking.
right_aws definitely needs an update. My pull request is simply a band-aid. right_aws should not be redefining method signatures of core ruby libraries.
Furthermore this pull request has been opened for months. I get the hint that this gem is no longer supported. Is it being supported elsewhere?
When I said "right_aws" I meant of course right_http_connection, which is this project. right_aws uses right_http_connection to talk to aws.
right_aws (I mean it this time) does seem to be receiving more maintainer love than right_http_connection.
ditto. I meant right_http_connection as well.
I intend to take a stab at rewriting Net::HTTP patches by right_http_connection to be less intrusive, no promises on when this happens though.
Is there any update on this issue - it's been two years since the last comment. I'm trying to update a relatively old paperclip installation to a newer version and I ran into this issue. Solved temporarily by removing right_http_connection & right_aws altogether, but it would be nice if these gems could play nicely together.