-
Notifications
You must be signed in to change notification settings - Fork 175
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
ruby 2.0 incompatibility #167
Comments
happens because in Ruby 2.0 Net::HTTP doesn't automatically unzip gzip responses. module RightAws
class RightAWSParser
alias_method :old_parse, :parse
def parse(xml_text, params={})
if !xml_text.is_a?(String) && xml_text.to_hash["content-encoding"].include?("gzip")
body = StringIO.new(xml_text.body)
xml_text = Zlib::GzipReader.new(body).read
end
old_parse(xml_text, params)
end
end
end should be handled by the gem, I guess... if this is a valid solution, I'd be happy to issue a Pull Request. |
This monkey patch worked for me on gem version |
The problem I'm having is that in using S3 and simpleDB. S3 works fine, but simpleDB returns a blank result no matter what I query. It will raise the proper error when I access something I don't have permission for, and there is no error when I query something I do have access to, it just won't return results. I checked with a desktop simpleDB client and it works. Switching using RVM back to 1.8.7 works fine. |
I would appreciate this fix going in. |
this isn't a right_aws thing. seems like whoever is maintaining Net::HTTP just went to sleep. the patch in this post is a must, regardless of which gem you're using. this is relevant for koala, aws, and many many more gems |
It seems like this would fix it: ? |
@rb2k - yup |
Weirdly enough, I still had to apply the manual fix to right_aws running on 2.1.0. Just looking through the parser class. |
@rb2k - It seems that the problem is actually in the right_http_connection gem, which overrides the request method and doesn't set decode_content on the response object. Until that gem is updated, my workaround is to add the following to my Gemfile: gem 'right_http_connection', git: 'git://github.com/rightscale/right_http_connection.git', ref: '3359524d81' |
Hey,
Can't give more details for now but generally problem is next:
capistrano-ec2group + right_aws don't work after moving to ruby 2.0.
Looks like it has something to do with Ec2#describe_resources_with_list_and_options which passes to block something different in ruby1.9.3. In result @ec2_api.describe_instances always returns [].
Gem version - 3.0.5
I will continue research if you have no idea why is it happening
The text was updated successfully, but these errors were encountered: