When I tried to upload an image, I am getting the below error in the log:
[paperclip] Saving attachments. [paperclip] saving report_photos/original/2.jpg (0.4ms) rollback transaction Completed 500 Internal Server Error in 948ms
Errno::ECONNREFUSED - Connection refused - connect(2):
/home/abcuser/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:763:ininitialize'
open'
/home/abcuser/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:763:in
/home/abcuser/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:763:inblock in connect'
timeout'
/home/abcuser/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/timeout.rb:69:in
/home/abcuser/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/timeout.rb:100:intimeout'
connect'
/home/abcuser/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:763:in
/home/abcuser/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:756:indo_start'
start' (gem) aws-sdk-1.3.9/lib/net/http/connection_pool/session.rb:84:in
/home/abcuser/.rvm/rubies/ruby-1.9.3-p551/lib/ruby/1.9.1/net/http.rb:751:infor'
session_for' (gem) aws-sdk-1.3.9/lib/net/http/connection_pool.rb:127:in
(gem) aws-sdk-1.3.9/lib/net/http/connection_pool.rb:190:inrequest' (gem) aws-sdk-1.3.9/lib/net/http/connection_pool/connection.rb:116:in
request' (gem) aws-sdk-1.3.9/lib/aws/core/http/net_http_handler.rb:44:inhandle'
block in make_sync_request' (gem) aws-sdk-1.3.9/lib/aws/core/client.rb:234:in
(gem) aws-sdk-1.3.9/lib/aws/core/client.rb:220:inretry_server_errors' (gem) aws-sdk-1.3.9/lib/aws/core/client.rb:215:in
make_sync_request'
(gem) aws-sdk-1.3.9/lib/aws/core/client.rb:390:inblock (2 levels) in client_request' (gem) aws-sdk-1.3.9/lib/aws/core/client.rb:287:in
log_client_request' (gem) aws-sdk-1.3.9/lib/aws/core/client.rb:363:inblock in client_request' (gem) aws-sdk-1.3.9/lib/aws/core/client.rb:275:in
return_or_raise'
(gem) aws-sdk-1.3.9/lib/aws/core/client.rb:362:inclient_request'
put_object' (gem) aws-sdk-1.3.9/lib/aws/s3/s3_object.rb:315:in
(eval):3:inwrite' (gem) paperclip-2.8.0/lib/paperclip/storage/s3.rb:295:in
block in flush_writes' (gem) paperclip-2.8.0/lib/paperclip/storage/s3.rb:281:ineach' (gem) paperclip-2.8.0/lib/paperclip/storage/s3.rb:281:in
flush_writes'
(gem) paperclip-2.8.0/lib/paperclip/attachment.rb:214:insave'
block in save_attached_files' (gem) paperclip-2.8.0/lib/paperclip.rb:465:in
(gem) paperclip-2.8.0/lib/paperclip.rb:472:inblock in each_attachment' (gem) paperclip-2.8.0/lib/paperclip.rb:464:in
each' (gem) paperclip-2.8.0/lib/paperclip.rb:464:ineach_attachment' (gem) paperclip-2.8.0/lib/paperclip.rb:471:in
save_attached_files' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:416:in_run__816062881__save__1024312303__callbacks' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in
__run_callback' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:385:in_run_save_callbacks' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:81:in
run_callbacks' (gem) activerecord-3.2.13/lib/active_record/callbacks.rb:264:increate_or_update' (gem) activerecord-3.2.13/lib/active_record/persistence.rb:84:in
save'
(gem) activerecord-3.2.13/lib/active_record/validations.rb:50:insave' (gem) activerecord-3.2.13/lib/active_record/attribute_methods/dirty.rb:22:in
save' (gem) activerecord-3.2.13/lib/active_record/transactions.rb:259:inblock (2 levels) in save' (gem) activerecord-3.2.13/lib/active_record/transactions.rb:313:in
block in with_transaction_returning_status' (gem) activerecord-3.2.13/lib/active_record/connection_adapters/abstract/database_statements.rb:192:intransaction' (gem) activerecord-3.2.13/lib/active_record/transactions.rb:208:in
transaction' (gem) activerecord-3.2.13/lib/active_record/transactions.rb:311:inwith_transaction_returning_status' (gem) activerecord-3.2.13/lib/active_record/transactions.rb:259:in
block in save' (gem) activerecord-3.2.13/lib/active_record/transactions.rb:270:inrollback_active_record_state!' (gem) activerecord-3.2.13/lib/active_record/transactions.rb:258:in
save'
app/controllers/photos_controller.rb:56:inblock in form_upload'
each'
app/controllers/photos_controller.rb:55:in
app/controllers/photos_controller.rb:55:inform_upload' (gem) actionpack-3.2.13/lib/action_controller/metal/implicit_render.rb:4:in
send_action' (gem) actionpack-3.2.13/lib/abstract_controller/base.rb:167:inprocess_action' (gem) actionpack-3.2.13/lib/action_controller/metal/rendering.rb:10:in
process_action' (gem) actionpack-3.2.13/lib/abstract_controller/callbacks.rb:18:inblock in process_action' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:447:in
_run__786939238__process_action__16233013__callbacks' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in__run_callback' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:385:in
_run_process_action_callbacks' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:81:inrun_callbacks' (gem) actionpack-3.2.13/lib/abstract_controller/callbacks.rb:17:in
process_action' (gem) actionpack-3.2.13/lib/action_controller/metal/rescue.rb:29:inprocess_action' (gem) actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:30:in
block in process_action' (gem) activesupport-3.2.13/lib/active_support/notifications.rb:123:inblock in instrument' (gem) activesupport-3.2.13/lib/active_support/notifications/instrumenter.rb:20:in
instrument' (gem) activesupport-3.2.13/lib/active_support/notifications.rb:123:ininstrument' (gem) actionpack-3.2.13/lib/action_controller/metal/instrumentation.rb:29:in
process_action' (gem) actionpack-3.2.13/lib/action_controller/metal/params_wrapper.rb:207:inprocess_action' (gem) activerecord-3.2.13/lib/active_record/railties/controller_runtime.rb:18:in
process_action' (gem) actionpack-3.2.13/lib/abstract_controller/base.rb:121:inprocess'
process' (gem) actionpack-3.2.13/lib/action_controller/metal.rb:203:in
(gem) actionpack-3.2.13/lib/abstract_controller/rendering.rb:45:indispatch'
dispatch' (gem) actionpack-3.2.13/lib/action_controller/metal.rb:246:in
(gem) actionpack-3.2.13/lib/action_controller/metal/rack_delegation.rb:14:inblock in action' (gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:in
call' (gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:73:indispatch' (gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:36:in
call' (gem) journey-1.0.4/lib/journey/router.rb:68:inblock in call' (gem) journey-1.0.4/lib/journey/router.rb:56:in
each' (gem) journey-1.0.4/lib/journey/router.rb:56:incall' (gem) actionpack-3.2.13/lib/action_dispatch/routing/route_set.rb:612:in
call' (gem) meta_request-0.2.1/lib/meta_request/middlewares/app_request_handler.rb:11:incall' (gem) rack-contrib-1.1.0/lib/rack/contrib/response_headers.rb:17:in
call'
(gem) meta_request-0.2.1/lib/meta_request/middlewares/headers.rb:16:incall' (gem) meta_request-0.2.1/lib/meta_request/middlewares/meta_request_handler.rb:13:in
call' (gem) better_errors-0.3.2/lib/better_errors/middleware.rb:51:inapp_call'
call' (gem) airbrake-3.1.7/lib/airbrake/rails/middleware.rb:15:in
(gem) better_errors-0.3.2/lib/better_errors/middleware.rb:45:incall'
call' (gem) warden-1.0.6/lib/warden/manager.rb:35:in
(gem) sass-3.2.5/lib/sass/plugin/rack.rb:54:inblock in call' (gem) warden-1.0.6/lib/warden/manager.rb:34:in
catch' (gem) warden-1.0.6/lib/warden/manager.rb:34:incall' (gem) client_side_validations-3.0.12/lib/client_side_validations/middleware.rb:17:in
call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/best_standards_support.rb:17:incall' (gem) rack-1.4.7/lib/rack/etag.rb:23:in
call' (gem) rack-1.4.7/lib/rack/conditionalget.rb:35:incall' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/head.rb:14:in
call' (gem) remotipart-1.0.2/lib/remotipart/middleware.rb:30:incall'
call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/flash.rb:242:in
(gem) actionpack-3.2.13/lib/action_dispatch/middleware/params_parser.rb:21:incall' (gem) rack-1.4.7/lib/rack/session/abstract/id.rb:210:in
context' (gem) rack-1.4.7/lib/rack/session/abstract/id.rb:205:incall' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/cookies.rb:341:in
call' (gem) activerecord-3.2.13/lib/active_record/query_cache.rb:64:incall'
call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:28:in
(gem) activerecord-3.2.13/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:inblock in call' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in
_run__573045024__call__1024312303__callbacks' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:405:in__run_callback' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:385:in
_run_call_callbacks' (gem) activesupport-3.2.13/lib/active_support/callbacks.rb:81:inrun_callbacks' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/callbacks.rb:27:in
call' (gem) rails-dev-tweaks-0.6.1/lib/rails_dev_tweaks/granular_autoload/middleware.rb:34:incall' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/remote_ip.rb:31:in
call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/debug_exceptions.rb:16:incall' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/show_exceptions.rb:56:in
call' (gem) railties-3.2.13/lib/rails/rack/logger.rb:32:incall_app' (gem) railties-3.2.13/lib/rails/rack/logger.rb:16:in
block in call' (gem) activesupport-3.2.13/lib/active_support/tagged_logging.rb:22:intagged' (gem) railties-3.2.13/lib/rails/rack/logger.rb:16:in
call' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/request_id.rb:22:incall' (gem) rack-1.4.7/lib/rack/methodoverride.rb:21:in
call'
(gem) rack-1.4.7/lib/rack/runtime.rb:17:incall' (gem) activesupport-3.2.13/lib/active_support/cache/strategy/local_cache.rb:72:in
call' (gem) rack-1.4.7/lib/rack/lock.rb:15:incall' (gem) actionpack-3.2.13/lib/action_dispatch/middleware/static.rb:63:in
call' (gem) airbrake-3.1.7/lib/airbrake/user_informer.rb:16:in_call' (gem) airbrake-3.1.7/lib/airbrake/user_informer.rb:12:in
call' (gem) railties-3.2.13/lib/rails/engine.rb:479:incall'
call' (gem) rack-1.4.7/lib/rack/content_length.rb:14:in
(gem) railties-3.2.13/lib/rails/application.rb:223:incall' (gem) railties-3.2.13/lib/rails/rack/log_tailer.rb:17:in
call' (gem) thin-1.5.0/lib/thin/connection.rb:81:inblock in pre_process' (gem) thin-1.5.0/lib/thin/connection.rb:79:in
catch' (gem) thin-1.5.0/lib/thin/connection.rb:79:inpre_process' (gem) thin-1.5.0/lib/thin/connection.rb:54:in
process' (gem) thin-1.5.0/lib/thin/connection.rb:39:inreceive_data' (gem) eventmachine-1.0.0/lib/eventmachine.rb:187:in
run_machine' (gem) eventmachine-1.0.0/lib/eventmachine.rb:187:inrun' (gem) thin-1.5.0/lib/thin/backends/base.rb:63:in
start' (gem) thin-1.5.0/lib/thin/server.rb:159:instart' (gem) rack-1.4.7/lib/rack/handler/thin.rb:13:in
run' (gem) rack-1.4.7/lib/rack/server.rb:268:instart' (gem) railties-3.2.13/lib/rails/commands/server.rb:70:in
start' (gem) railties-3.2.13/lib/rails/commands.rb:55:inblock in <top (required)>' (gem) railties-3.2.13/lib/rails/commands.rb:50:in
tap' (gem) railties-3.2.13/lib/rails/commands.rb:50:in<top (required)>'
require' script/rails:6:in `'
script/rails:6:inStarted POST "/__better_errors/98360080/variables" for xxx-xxx-xx-xx(ip address)
This is an maintenance project and I am using rvm with Ruby 1.9.3p551 and Rails Rails 3.2.13 and paperclip used for uploads. Please suggest where I went wrong?
Aucun commentaire:
Enregistrer un commentaire