HeyWatch gem + AWS/S3 issue

Subscribe to HeyWatch gem + AWS/S3 issue 2 posts, 2 voices

 
Avatar JeffP 2 posts

I get a strange result when I run this script:


require "rubygems" 
require 'heywatch'
require 'time'
require 'aws/s3'

include HeyWatch

Base::establish_connection! :login => 'USERNAME', :password => 'PASSWORD'
raw_video = HeyWatch::Video.create(:file => "h264.mov") # file exists on all systems
puts raw_video.to_yaml

On my Macbook and my Ubuntu server, this yields the following:


attributes: 
  updated_at: 2009-11-18 05:17:59 -08:00
  specs: 
    audio: 
      sample_rate: 44100
      stream: 0.0
      codec: aac
      bitrate: 0
      channels: 2
    size: 907
    thumb: <a href="http://raw-1.heywatch.com/thumbs/f56f5e8859/CGI.27808.0.jpg">http://raw-1.heywatch.com/thumbs/f56f5e8859/CGI.27808.0.jpg</a>
    mime_type: video/quicktime
    video: 
      container: mov
      aspect: 1.33
      stream: 0.1
      codec: h264
      bitrate: 2397
      length: 3
      height: 300
      fps: 29.97
      width: 400
  title: h264
  id: 2123940
  created_at: 2009-11-18 05:17:59 -08:00

But on my iMac, I get this:


attributes: 
  video: 
    updated_at: 2009-11-18 05:18:57 -08:00
    specs: 
      audio: 
        sample_rate: 44100
        stream: 0.0
        codec: aac
        bitrate: 0
        channels: 2
      size: 907
      thumb: <a href="http://raw-2.heywatch.com/thumbs/bb29db84d4/CGI.9424.0.jpg">http://raw-2.heywatch.com/thumbs/bb29db84d4/CGI.9424.0.jpg</a>
      mime_type: video/quicktime
      video: 
        container: mov
        aspect: 1.33
        stream: 0.1
        codec: h264
        bitrate: 2397
        length: 3
        height: 300
        fps: 29.97
        width: 400
    title: h264
    id: 2123942
    created_at: 2009-11-18 05:18:57 -08:00

A video attribute wraps everything. If I remove the aws/s3 requirement, it works just like my other machines. All machines are Ruby 1.8.6, all gems and dependencies are the same version, source movie is the same. Any idea what could be causing this to happen on just one machine? I’m stumped!

 
Avatar KevinMoultrie 1 post

It looks to be a problem with the formatting. Are you using the same code on all machines?