I'm seeing an issue with aws-sdk 1.51.0 under Ruby 1.8.7. The following code demonstrates it:
#!/usr/bin/env ruby
require 'rubygems'
require 'aws-sdk'
iam = AWS::IAM.new(
:credential_provider => AWS::Core::CredentialProviders::SharedCredentialFileProvider.new
)
iam.users['<SOME IAM USER>']
This code generates the following traceback when run under Ruby 1.8.7:
/var/lib/gems/1.8/gems/aws-sdk-1.51.0/lib/aws/core/credential_providers.rb:278:in
`initialize': undefined method `home' for Dir:Class (NoMethodError)
from /tmp/aws-sdk-test.rb:7:in `new'
from /tmp/aws-sdk-test.rb:7
It looks like the fundamental issue is that there is no Dir.home method in that version of Ruby; it's only in 1.9.x and later. I can work around the issue by passing a :path to SharedCredentialFileProvider, but it would be nice if this worked out of the box (or alternately, enforce the dependency on Ruby 1.9.x in the Gemfile, but that's unfortunate for people using the system Ruby).
I'm seeing an issue with aws-sdk 1.51.0 under Ruby 1.8.7. The following code demonstrates it:
This code generates the following traceback when run under Ruby 1.8.7:
It looks like the fundamental issue is that there is no
Dir.homemethod in that version of Ruby; it's only in 1.9.x and later. I can work around the issue by passing a:pathtoSharedCredentialFileProvider, but it would be nice if this worked out of the box (or alternately, enforce the dependency on Ruby 1.9.x in the Gemfile, but that's unfortunate for people using the system Ruby).