我不知道为什么我会因为删除存储桶而遇到TypeError。下面是我输入ruby控制台的命令:
AWS :: S3 :: Bucket.delete('my_bucket',:force => true)
然后我收到了一堆错误:
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 `'
需要帮助,谢谢!
答案 0 :(得分:0)
我无法回答你的具体问题,但我可以说我对这个宝石有很多问题。
我建议你改用右手宝石:
http://rightaws.rubyforge.org/right_aws_gem_doc/
它还可以做很多很酷的事情,比如在文件夹中列出文件夹。