使用 rails 3.0.6,rake 0.8.7 和路边。
我正在尝试使用 SSL 连接远程 Android 客户端,但出现以下异常Curl::Err::SSLPeerCertificateError
我得到的错误跟踪如下:
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/curb-0.8.3/lib/curl/easy.rb:60:in `perform'
/home/user/releases/20121226212154/webapp/lib/android_push.rb:24:in `http_post'
/home/user/releases/20121226212154/webapp/lib/android_push.rb:24:in `send_command'
/home/user/releases/20121226212154/webapp/lib/device_commands.rb:14:in `command_on_demand'
/home/user/releases/20121226212154/webapp/app/controllers/positions_controller.rb:70:in `on_demand'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/abstract_controller/base.rb:150:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal/rendering.rb:11:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/abstract_controller/callbacks.rb:18:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/callbacks.rb:506:in `_run__891378805__process_action__691620700__callbacks'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/callbacks.rb:410:in `send'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/callbacks.rb:410:in `_run_process_action_callbacks'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/callbacks.rb:94:in `send'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/callbacks.rb:94:in `run_callbacks'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/abstract_controller/callbacks.rb:17:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/notifications.rb:52:in `instrument'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/notifications.rb:52:in `instrument'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal/rescue.rb:17:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:34:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:268:in `perform_action_with_newrelic_trace'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/method_tracer.rb:242:in `trace_execution_scoped'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/instrumentation/controller_instrumentation.rb:263:in `perform_action_with_newrelic_trace'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/newrelic_rpm-3.5.3.25/lib/new_relic/agent/instrumentation/rails3/action_controller.rb:33:in `process_action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/abstract_controller/base.rb:119:in `process'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/abstract_controller/rendering.rb:41:in `process'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal.rb:138:in `dispatch'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_controller/metal.rb:178:in `action'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/routing/route_set.rb:62:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/routing/route_set.rb:62:in `dispatch'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/routing/route_set.rb:27:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:148:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:93:in `recognize'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:96:in `optimized_each'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-mount-0.6.14/lib/rack/mount/code_generation.rb:92:in `recognize'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-mount-0.6.14/lib/rack/mount/route_set.rb:139:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/routing/route_set.rb:493:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/newrelic_rpm-3.5.3.25/lib/new_relic/rack/error_collector.rb:8:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/newrelic_rpm-3.5.3.25/lib/new_relic/rack/browser_monitoring.rb:12:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/mongoid-2.2.6/lib/rack/mongoid/middleware/identity_map.rb:33:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/mongoid-2.2.6/lib/mongoid.rb:130:in `unit_of_work'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/mongoid-2.2.6/lib/rack/mongoid/middleware/identity_map.rb:33:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/warden-1.0.6/lib/warden/manager.rb:35:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/warden-1.0.6/lib/warden/manager.rb:34:in `catch'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/warden-1.0.6/lib/warden/manager.rb:34:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/head.rb:14:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-1.2.5/lib/rack/methodoverride.rb:24:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/flash.rb:182:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/cookies.rb:302:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activerecord-3.0.6/lib/active_record/query_cache.rb:32:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activerecord-3.0.6/lib/active_record/query_cache.rb:12:in `cache'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activerecord-3.0.6/lib/active_record/query_cache.rb:31:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activerecord-3.0.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:354:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/callbacks.rb:46:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/activesupport-3.0.6/lib/active_support/callbacks.rb:416:in `_run_call_callbacks'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/callbacks.rb:44:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-1.2.5/lib/rack/sendfile.rb:106:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/remote_ip.rb:48:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/actionpack-3.0.6/lib/action_dispatch/middleware/show_exceptions.rb:47:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/railties-3.0.6/lib/rails/rack/logger.rb:13:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-1.2.5/lib/rack/runtime.rb:17:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-1.2.5/lib/rack/lock.rb:1Server version: Apache/2.2.22 (Ubuntu) Server built: Nov 6 2012 20:27:22 3:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-1.2.5/lib/rack/lock.rb:13:in `synchronize'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/rack-1.2.5/lib/rack/lock.rb:13:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/railties-3.0.6/lib/rails/application.rb:168:in `call'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/railties-3.0.6/lib/rails/application.rb:77:in `send'
/home/user/releases/20121226212154/webapp/vendor/ruby/1.8/gems/railties-3.0.6/lib/rails/application.rb:77:in `method_missing'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb:206:in `start_request_handler'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb:171:in `send'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb:171:in `handle_spawn_application'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/utils.rb:470:in `safe_fork'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb:166:in `handle_spawn_application'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:180:in `start'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/rack/application_spawner.rb:129:in `start'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rack_application'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rack_application'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:357:in `__send__'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/home/user/.rvm/gems/ruby-1.8.7-p371/gems/passenger-3.0.18/helper-scripts/passenger-spawn-server:99
我正在使用 Ubuntu 12.10、Apache 2.2.22、Phusion Passenger 3.0.18 和 Ruby 1.8.7。
如何修复此 cURL 异常?是 rails 问题还是 apache2、ssl 和 phusion 乘客配置问题?