Gitorious 添加 ssh 密钥时出现 500 错误

Gitorious 添加 ssh 密钥时出现 500 错误

我在 Ubuntu 上的 Nginx 和 Passenger 下配置了 Gitorious。当我尝试添加 ssh 密钥时,我收到 500 服务器错误,gitorious 告诉我已通知负责人员。在服务器日志中我们看到:

TypeError (can't convert nil into Integer):
  vendor/plugins/paperclip/lib/paperclip/processor.rb:45:in `sprintf'
  vendor/plugins/paperclip/lib/paperclip/processor.rb:45:in `make_tmpname'
  /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/tmpdir.rb:132:in `create'
  /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/tempfile.rb:134:in `initialize'
  app/models/ssh_key.rb:121:in `new'
  app/models/ssh_key.rb:121:in `valid_key_using_ssh_keygen?'
  app/models/ssh_key.rb:47:in `validate'
  vendor/rails/activerecord/lib/active_record/validations.rb:1099:in `valid?'
  vendor/rails/activerecord/lib/active_record/callbacks.rb:315:in `valid_with_callbacks?'
  vendor/rails/activerecord/lib/active_record/validations.rb:1077:in `save_with_validation'
  vendor/rails/activerecord/lib/active_record/dirty.rb:79:in `save_with_dirty'
  vendor/rails/activerecord/lib/active_record/transactions.rb:229:in `block in with_transaction_returning_status'
  vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
  vendor/rails/activerecord/lib/active_record/transactions.rb:182:in `transaction'
  vendor/rails/activerecord/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'
  vendor/rails/activerecord/lib/active_record/transactions.rb:196:in `block in save_with_transactions'
  vendor/rails/activerecord/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
  vendor/rails/activerecord/lib/active_record/transactions.rb:196:in `save_with_transactions'
  app/controllers/keys_controller.rb:48:in `block in create'
  vendor/rails/actionpack/lib/action_controller/mime_responds.rb:106:in `call'
  vendor/rails/actionpack/lib/action_controller/mime_responds.rb:106:in `respond_to'
  app/controllers/keys_controller.rb:47:in `create'
  vendor/rails/actionpack/lib/action_controller/base.rb:1331:in `perform_action'
  vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters'
  vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_with_filters'
  vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
  vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `block in ms'
  /usr/local/rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/benchmark.rb:309:in `realtime'
  vendor/rails/activesupport/lib/active_support/core_ext/benchmark.rb:17:in `ms'
  vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
      vendor/rails/actionpack/lib/action_controller/rescue.rb:160:in `perform_action_with_rescue'
  vendor/rails/actionpack/lib/action_controller/flash.rb:146:in `perform_action_with_flash'
  vendor/rails/actionpack/lib/action_controller/base.rb:532:in `process'
  vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_with_filters'
  vendor/rails/actionpack/lib/action_controller/base.rb:391:in `process'
  vendor/rails/actionpack/lib/action_controller/base.rb:386:in `call'
  vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:437:in `call'
  vendor/rails/actionpack/lib/action_controller/dispatcher.rb:87:in `dispatch'
  vendor/rails/actionpack/lib/action_controller/dispatcher.rb:121:in `_call'
  vendor/rails/actionpack/lib/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
  vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `call'
  vendor/rails/activerecord/lib/active_record/query_cache.rb:29:in `block in call'
  vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  vendor/rails/activerecord/lib/active_record/query_cache.rb:9:in `cache'
  vendor/rails/activerecord/lib/active_record/query_cache.rb:28:in `call'
  vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  vendor/rails/actionpack/lib/action_controller/string_coercion.rb:25:in `call'
  rack (1.0.1) lib/rack/head.rb:9:in `call'
  rack (1.0.1) lib/rack/methodoverride.rb:24:in `call'
  vendor/rails/actionpack/lib/action_controller/params_parser.rb:15:in `call'
  vendor/rails/railties/lib/rails/rack/metal.rb:47:in `call'
  vendor/rails/actionpack/lib/action_controller/session/cookie_store.rb:93:in `call'
  vendor/rails/activesupport/lib/active_support/cache/strategy/local_cache.rb:24:in `call'
  vendor/rails/actionpack/lib/action_controller/failsafe.rb:26:in `call'
  rack (1.0.1) lib/rack/lock.rb:11:in `block in call'
  <internal:prelude>:10:in `synchronize'
  rack (1.0.1) lib/rack/lock.rb:11:in `call'
  vendor/rails/actionpack/lib/action_controller/dispatcher.rb:106:in `call'
  passenger (3.0.2) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.2) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  passenger (3.0.2) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `block in handle_spawn_application'
  passenger (3.0.2) lib/phusion_passenger/utils.rb:479:in `safe_fork'
  passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:180:in `start'
  passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:219:in `block (2 levels) in spawn_rails_application'
  passenger (3.0.2) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:214:in `block in spawn_rails_application'
  passenger (3.0.2) lib/phusion_passenger/abstract_server_collection.rb:82:in `block in synchronize'
  <internal:prelude>:10:in `synchronize'
  passenger (3.0.2) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.2) helper-scripts/passenger-spawn-server:99:in `<main>'

我在这里看到过此通知:http://groups.google.com/group/gitorious/browse_thread/thread/db20b2c7eef2d5a9但没有发布解决方案。我自己不是 RoR 爱好者,所以不知道可能的解决方案是什么。

相关内容