I'm trying to access my Amazon S3 account using the aws-s3 gem, but no matter what I do, I can't even print a bucket list.
Error:
undefined method `bytesize' for #<AWS::S3::Bucket:0x1b9e488>
From Code:
# hello_world.rb
require 'rubygems'
require 'sinatra'
require 'aws/s3'
get '/' do
connection = AWS::S3::Base.establish_connection!(
:access_key_id => 'AKIAIQUEVTJR3DCZYWRQ',
:secret_access_key => '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'
)
AWS::S3::Service.buckets
end
I'm not too experienced with Ruby, am I just missing something obvious?