Title: s3sync: Content-Length 0 Post by: js on August 04, 2007, 12:38:50 PM Hi,
I am new to ruby and s3sync. It appears to be almost working. I can list buckets and put and get files, but the files are all zero length. s3sync.rb -v -d s3sync.tar.gz bucketname:again Trying command put bucketname again2/s3sync.tar.gz #<S3::S3Object:0xb7d68220> x-amz-acl public-read Content-Type application/x-gzip Content-Length 0 with 100 retries left The file is Size: 26667 ruby 1.8.4 (2005-12-24) [i386-linux] Does it relate to headers['Content-Length'] = FileTest.size(file).to_s Thanks, Jerry Title: Re: s3sync: Content-Length 0 Post by: ferrix on August 04, 2007, 01:01:13 PM You can't use s3sync with a file argument, only a directory. This limitation may go away in the future, but probably not. If you are desperate to transfer a single file you can use s3cmd with the "put" command.
Title: Re: s3sync: Content-Length 0 Post by: js on August 04, 2007, 09:32:02 PM Thank you clarifying that this only works with directories.
Is there a routine way for s3cmd.rb to find its include files? I put these scripts in my path, but they error because the required files do not have fully qualified paths. Does ruby have a variable for relative to the script path? Thanks, Jerry Title: Re: s3sync: Content-Length 0 Post by: ferrix on August 05, 2007, 02:01:24 AM I actually don't know the answer.. if you are putting the script and the satellite files in different places, maybe define that to be part of the ruby library path? (I'm not much of a ruby expert..)
I keep them all together, and stand with the current directory as the s3sync dir. From there I use "full paths" to indicate the operands. Title: Re: s3sync: Content-Length 0 Post by: lowflyinghawk on September 03, 2007, 06:48:40 PM export RUBYLIB=/path/to/your/libraries
e.g. if require 'blah' and /path/to/blah then export RUBYLIB=/path/to |