我正在使用 aws_sdk gem 将文件存储在 s3 中我在生产中遇到了一个有线问题,我无法解析一些特定的 url。
从日志中我得到以下异常
put_object(:acl=>"private",:bucket_name=>"bucket_name",:content_length=>27648,:content_type=>"application/vnd.ms-excel",:data=>#<File:/tmp/stream20131030-18453-ohvaxu-0.xls>,:key=>"original/ֳĶʡ,彼.xls")
…ms/ruby/1.8/gems/aws-sdk-1.11.3/lib/aws/core/client.rb: 360:in `return_or_raise'
…ms/ruby/1.8/gems/aws-sdk-1.11.3/lib/aws/core/client.rb: 461:in `client_request'
(eval):3:in `put_object'
…s/ruby/1.8/gems/aws-sdk-1.11.3/lib/aws/s3/s3_object.rb:1703:in `write_with_put_object'
…s/ruby/1.8/gems/aws-sdk-1.11.3/lib/aws/s3/s3_object.rb: 607:in `write'
…es/20131030195732/vendor/plugins/paperclip_ext/init.rb: 18:in `flush_writes'
…es/20131030195732/vendor/plugins/paperclip_ext/init.rb: 4:in `each'
…es/20131030195732/vendor/plugins/paperclip_ext/init.rb: 4:in `flush_writes'
…y/1.8/gems/paperclip-2.8.0/lib/paperclip/attachment.rb: 214:in `save'
…ed_gems/ruby/1.8/gems/paperclip-2.8.0/lib/paperclip.rb: 472:in `send'
…ed_gems/ruby/1.8/gems/paperclip-2.8.0/lib/paperclip.rb: 472:in `save_attached_files'
…ed_gems/ruby/1.8/gems/paperclip-2.8.0/lib/paperclip.rb: 465:in `each_attachment'
…ed_gems/ruby/1.8/gems/paperclip-2.8.0/lib/paperclip.rb: 464:in `each'
…ed_gems/ruby/1.8/gems/paperclip-2.8.0/lib/paperclip.rb: 464:in `each_attachment'
…ed_gems/ruby/1.8/gems/paperclip-2.8.0/lib/paperclip.rb: 471:in `save_attached_files'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 178:in `send'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 178:in `evaluate_method'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 166:in `call'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 93:in `run'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 92:in `each'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 92:in `send'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 92:in `run'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 276:in `run_callbacks'
…ems/activerecord-2.3.18/lib/active_record/callbacks.rb: 344:in `callback'
…ems/activerecord-2.3.18/lib/active_record/callbacks.rb: 251:in `create_or_update'
…1.8/gems/activerecord-2.3.18/lib/active_record/base.rb:2585:in `save_without_validation'
…s/activerecord-2.3.18/lib/active_record/validations.rb:1089:in `save_without_dirty'
….8/gems/activerecord-2.3.18/lib/active_record/dirty.rb: 79:in `save_without_transactions'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 229:in `send'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 229:in `with_transaction_returning_status'
…rd/connection_adapters/abstract/database_statements.rb: 136:in `transaction_without_callback'
…_commit-1.0.11/lib/after_commit/connection_adapters.rb: 14:in `transaction'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 182:in `transaction_ActiveRecord_self_name_transaction'
…gems/deadlock_retry-801e84f45aed/lib/deadlock_retry.rb: 31:in `transaction_without_slave_off'
….7.0/lib/active_record_shards/default_slave_patches.rb: 52:in `transaction'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 228:in `with_transaction_returning_status'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 196:in `save'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 208:in `rollback_active_record_state!'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 196:in `save'
…lib/active_record/associations/has_many_association.rb: 61:in `insert_record'
…18/lib/active_record/associations/association_proxy.rb: 146:in `send'
…18/lib/active_record/associations/association_proxy.rb: 146:in `send'
…ecord-2.3.18/lib/active_record/autosave_association.rb: 323:in `save_collection_association'
…b/active_record/associations/association_collection.rb: 392:in `method_missing_without_paginate'
…18/lib/active_record/associations/association_proxy.rb: 215:in `each'
…18/lib/active_record/associations/association_proxy.rb: 215:in `send'
…18/lib/active_record/associations/association_proxy.rb: 215:in `method_missing'
…b/active_record/associations/association_collection.rb: 392:in `method_missing_without_paginate'
…ndor/plugins/will_paginate/lib/will_paginate/finder.rb: 167:in `method_missing'
…ecord-2.3.18/lib/active_record/autosave_association.rb: 314:in `save_collection_association'
…ecord-2.3.18/lib/active_record/autosave_association.rb: 176:in `autosave_associated_records_for_attachments'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 178:in `send'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 178:in `evaluate_method'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 166:in `call'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 93:in `run'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 92:in `each'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 92:in `send'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 92:in `run'
…s/activesupport-2.3.18/lib/active_support/callbacks.rb: 276:in `run_callbacks'
…ems/activerecord-2.3.18/lib/active_record/callbacks.rb: 344:in `callback'
…ems/activerecord-2.3.18/lib/active_record/callbacks.rb: 267:in `create'
…1.8/gems/activerecord-2.3.18/lib/active_record/base.rb:2935:in `create_or_update_without_callbacks'
…ems/activerecord-2.3.18/lib/active_record/callbacks.rb: 250:in `create_or_update'
…1.8/gems/activerecord-2.3.18/lib/active_record/base.rb:2602:in `save_without_validation!'
…s/activerecord-2.3.18/lib/active_record/validations.rb:1099:in `save_without_dirty!'
….8/gems/activerecord-2.3.18/lib/active_record/dirty.rb: 87:in `save_without_transactions!'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 200:in `save!'
…rd/connection_adapters/abstract/database_statements.rb: 136:in `transaction_without_callback'
…_commit-1.0.11/lib/after_commit/connection_adapters.rb: 14:in `transaction'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 182:in `transaction_ActiveRecord_self_name_transaction'
…gems/deadlock_retry-801e84f45aed/lib/deadlock_retry.rb: 31:in `transaction_without_slave_off'
….7.0/lib/active_record_shards/default_slave_patches.rb: 52:in `transaction'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 200:in `save!'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 208:in `rollback_active_record_state!'
…/activerecord-2.3.18/lib/active_record/transactions.rb: 200:in `save!'
…eleases/20131030195732/lib/helpdesk/services/ticket.rb: 13:in `save_ticket!'
…/releases/20131030195732/lib/helpdesk/process_email.rb: 234:in `create_ticket'
…/releases/20131030195732/lib/helpdesk/process_email.rb: 44:in `perform'
…vendor/plugins/ar_shards/lib/fd_connection_switcher.rb: 8:in `on_shard'
…20131030195732/vendor/plugins/sharding/lib/sharding.rb: 8:in `select_shard_of'
…/releases/20131030195732/lib/helpdesk/process_email.rb: 19:in `perform'
…ses/20131030195732/app/controllers/email_controller.rb: 21:in `create'
…8/gems/actionpack-2.3.18/lib/action_controller/base.rb:1333:in `send'
…8/gems/actionpack-2.3.18/lib/action_controller/base.rb:1333:in `perform_action_without_filters'
…ems/actionpack-2.3.18/lib/action_controller/filters.rb: 617:in `call_filters'
…ems/actionpack-2.3.18/lib/action_controller/filters.rb: 610:in `perform_action_without_benchmark'
…ctionpack-2.3.18/lib/action_controller/benchmarking.rb: 68:in `perform_action_without_rescue'
…upport-2.3.18/lib/active_support/core_ext/benchmark.rb: 17:in `ms'
/usr/lib64/rubyee/1.8/benchmark.rb: 308:in `realtime'
…upport-2.3.18/lib/active_support/core_ext/benchmark.rb: 17:in `ms'
…ctionpack-2.3.18/lib/action_controller/benchmarking.rb: 68:in `perform_action_without_rescue'
…gems/actionpack-2.3.18/lib/action_controller/rescue.rb: 160:in `perform_action_without_flash'
…/gems/actionpack-2.3.18/lib/action_controller/flash.rb: 151:in `perform_action_trace'
…8/gems/actionpack-2.3.18/lib/action_controller/base.rb: 532:in `send'
…8/gems/actionpack-2.3.18/lib/action_controller/base.rb: 532:in `process_without_filters'
…ems/actionpack-2.3.18/lib/action_controller/filters.rb: 606:in `process_without_compass'
…/compass-rails-1.0.3/lib/compass-rails/railties/2_3.rb: 9:in `process'
…8/gems/actionpack-2.3.18/lib/action_controller/base.rb: 391:in `process'
…8/gems/actionpack-2.3.18/lib/action_controller/base.rb: 386:in `call'
…pack-2.3.18/lib/action_controller/routing/route_set.rb: 438:in `call'
…/actionpack-2.3.18/lib/action_controller/dispatcher.rb: 87:in `dispatch'
…/actionpack-2.3.18/lib/action_controller/dispatcher.rb: 121:in `_call'
…/actionpack-2.3.18/lib/action_controller/dispatcher.rb: 130:in `build_middleware_stack'
…s/activerecord-2.3.18/lib/active_record/query_cache.rb: 29:in `call'
…s/activerecord-2.3.18/lib/active_record/query_cache.rb: 29:in `call'
…ive_record/connection_adapters/abstract/query_cache.rb: 34:in `cache'
…s/activerecord-2.3.18/lib/active_record/query_cache.rb: 9:in `cache'
…s/activerecord-2.3.18/lib/active_record/query_cache.rb: 28:in `call'
…record/connection_adapters/abstract/connection_pool.rb: 361:in `call'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 168:in `call!'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 148:in `call'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 168:in `call!'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 148:in `call'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 168:in `call!'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 148:in `call'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 168:in `call!'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 148:in `call'
…/ruby/1.8/gems/omniauth-1.0.0/lib/omniauth/strategy.rb: 168:in `call!'
当我尝试通过控制台执行相同操作时,一切正常。
任何人都可以指出我正确的方向来解决这个问题,任何帮助将不胜感激。