title: Listing buckets with AWS::S3 in Sinatra
body: <p>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.</p>
  
  <p>Error:</p>
  
  <pre><code>undefined method `bytesize' for #&lt;AWS::S3::Bucket:0x1b9e488&gt;
  </code></pre>
  
  <p>From Code:</p>
  
  <pre><code># hello_world.rb
  require 'rubygems'
  require 'sinatra'
  require 'aws/s3'
  
  get '/' do
    connection = AWS::S3::Base.establish_connection!(
       :access_key_id     =&gt; '***',
       :secret_access_key =&gt; '***'
     )
    AWS::S3::Service.buckets
  end
  </code></pre>
  
  <p>I'm not too experienced with Ruby, am I just missing something obvious?</p>