Got TypeError while delete AWS/S3 buckets
I am not sure why I am getting a TypeError for deleting a bucket. Below is the command I typed into the ruby console:
AWS::S3::Bucket.delete('my_bucket', :force => true)
then I got this bunch of errors:
TypeError: can't convert Time into String from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/object.rb:300:in `join' from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/object.rb:300:in `path!' from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/object.rb:223:in `delete' from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/object.rb:547:in `delete' from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/bucket.rb:275:in `block in delete_all' from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/bucket.rb:253:in `each' from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/bucket.rb:253:in `each' from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/bucket.rb:274:in `delete_all' from /Users/Kinglee/.rvm/gems/ruby-1.9.2-p180@rails3tutorial/gems/aws-s3-0.6.2/lib/aws/s3/bucket.rb:160:in `delete' from (irb):19 from /Users/Kinglee/.rvm/rubies/ruby-1.9.2-p180/bin/irb:16:in `'
Need help, thanks!
I can't answer your specifici problem, but I can say that I've had lots of issues with that gem.
I'd suggest you use the rightaws gem instead:
http://rightaws.rubyforge.org/right_aws_gem_doc/
it can also do a lot more cool stuff like listing folders in a bucket.
链接地址: http://www.djcxy.com/p/41918.html