1

나는 projectCommunity engine gem(2.3.1을 사용 중입니다. 나는 루비 1.9.3에있어 및 3.2.8커뮤니티 엔진을 사용하여 사진을 업로드 할 수 없습니다.

내가 프로필 사진을 업로드하려고 해요, 내가 아래 오류 얻을 레일 -

can't convert Configatron::Store to Array (Configatron::Store#to_ary gives Configatron::Store). 

응용 프로그램 추적은 아래의 오류를 제공을 -

{"utf8"=>"✓", 
"_method"=>"put", 
"authenticity_token"=>"mLZMbkUHoupgAZyJKFS4Zif0s3MTGZQowY4Rt4ugUJo=", 
"user"=>{"avatar_attributes"=>{"photo"=>#<ActionDispatch::Http::UploadedFile:0xafc4d38 @original_filename="img_0875.jpg", 
@content_type="image/jpeg", 
@headers="Content-Disposition: form-data; name=\"user[avatar_attributes][photo]\"; filename=\"img_0875.jpg\"\r\nContent-Type: image/jpeg\r\n", 
@tempfile=#<File:/tmp/RackMultipart20140307-19979-1r5bo7u>>, 
"user_id"=>3}, 
"zip"=>"", 
"birthday(1i)"=>"1982", 
"birthday(2i)"=>"3", 
"birthday(3i)"=>"7", 
"description"=>""}, 
"country_id"=>"", 
"tag_list"=>"", 
"commit"=>"Save Changes", 
"id"=>"chris"} 
,691 - 내가 노력하고있어 사진 업로드의 일부로 전달받을

configatron (3.0.1) lib/configatron/store.rb:81:in `method_missing' 

params 객체를 파라미터는 아래에서 언급 363,210

전체 흔적은 아래 캡처 한 경우에 도움이됩니다 -

configatron (3.0.1) lib/configatron/store.rb:81:in `method_missing' 
paperclip (3.5.1) lib/paperclip/attachment.rb:188:in `styles' 
paperclip (3.5.1) lib/paperclip/attachment.rb:423:in `post_process_styles' 
paperclip (3.5.1) lib/paperclip/attachment.rb:416:in `block (2 levels) in post_process' 
activesupport (3.2.8) lib/active_support/callbacks.rb:436:in `_run__210846493__photo_post_process__19440801__callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback' 
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_photo_post_process_callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks' 
paperclip (3.5.1) lib/paperclip/callbacks.rb:26:in `run_paperclip_callbacks' 
paperclip (3.5.1) lib/paperclip/attachment.rb:414:in `block in post_process' 
activesupport (3.2.8) lib/active_support/callbacks.rb:403:in `_run__210846493__post_process__19440801__callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback' 
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_post_process_callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks' 
paperclip (3.5.1) lib/paperclip/callbacks.rb:26:in `run_paperclip_callbacks' 
paperclip (3.5.1) lib/paperclip/attachment.rb:413:in `post_process' 
paperclip (3.5.1) lib/paperclip/attachment.rb:112:in `assign' 
paperclip (3.5.1) lib/paperclip/has_attached_file.rb:65:in `block in define_setter' 
activerecord (3.2.8) lib/active_record/attribute_assignment.rb:85:in `block in assign_attributes' 
activerecord (3.2.8) lib/active_record/attribute_assignment.rb:78:in `each' 
activerecord (3.2.8) lib/active_record/attribute_assignment.rb:78:in `assign_attributes' 
activerecord (3.2.8) lib/active_record/base.rb:498:in `initialize' 
activerecord (3.2.8) lib/active_record/reflection.rb:183:in `new' 
activerecord (3.2.8) lib/active_record/reflection.rb:183:in `build_association' 
activerecord (3.2.8) lib/active_record/associations/association.rb:233:in `build_record' 
activerecord (3.2.8) lib/active_record/associations/singular_association.rb:29:in `build' 
activerecord (3.2.8) lib/active_record/associations/builder/singular_association.rb:20:in `block in define_constructors' 
activerecord (3.2.8) lib/active_record/nested_attributes.rb:337:in `assign_nested_attributes_for_one_to_one_association' 
activerecord (3.2.8) lib/active_record/nested_attributes.rb:288:in `avatar_attributes=' 
activerecord (3.2.8) lib/active_record/attribute_assignment.rb:94:in `block in assign_attributes' 
activerecord (3.2.8) lib/active_record/attribute_assignment.rb:93:in `each' 
activerecord (3.2.8) lib/active_record/attribute_assignment.rb:93:in `assign_attributes' 
activerecord (3.2.8) lib/active_record/persistence.rb:215:in `block in update_attributes' 
activerecord (3.2.8) lib/active_record/transactions.rb:295:in `block in with_transaction_returning_status' 
activerecord (3.2.8) lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction' 
activerecord (3.2.8) lib/active_record/transactions.rb:208:in `transaction' 
activerecord (3.2.8) lib/active_record/transactions.rb:293:in `with_transaction_returning_status' 
activerecord (3.2.8) lib/active_record/persistence.rb:214:in `update_attributes' 
community_engine (2.3.1) app/controllers/users_controller.rb:124:in `update' 
actionpack (3.2.8) lib/action_controller/metal/implicit_render.rb:4:in `send_action' 
actionpack (3.2.8) lib/abstract_controller/base.rb:167:in `process_action' 
actionpack (3.2.8) lib/action_controller/metal/rendering.rb:10:in `process_action' 
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:18:in `block in process_action' 
activesupport (3.2.8) lib/active_support/callbacks.rb:504:in `block (2 levels) in _run__201379291__process_action__881180949__callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_1633' 
activesupport (3.2.8) lib/active_support/callbacks.rb:326:in `around' 
activesupport (3.2.8) lib/active_support/callbacks.rb:310:in `_callback_around_1600' 
activesupport (3.2.8) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_1633' 
activesupport (3.2.8) lib/active_support/callbacks.rb:459:in `block in _run__201379291__process_action__881180949__callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_1632' 
community_engine (2.3.1) lib/community_engine/localized_application.rb:30:in `set_locale' 
activesupport (3.2.8) lib/active_support/callbacks.rb:214:in `_conditional_callback_around_1632' 
activesupport (3.2.8) lib/active_support/callbacks.rb:425:in `_run__201379291__process_action__881180949__callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback' 
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks' 
actionpack (3.2.8) lib/abstract_controller/callbacks.rb:17:in `process_action' 
actionpack (3.2.8) lib/action_controller/metal/rescue.rb:29:in `process_action' 
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' 
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `block in instrument' 
activesupport (3.2.8) lib/active_support/notifications/instrumenter.rb:20:in `instrument' 
activesupport (3.2.8) lib/active_support/notifications.rb:123:in `instrument' 
actionpack (3.2.8) lib/action_controller/metal/instrumentation.rb:29:in `process_action' 
actionpack (3.2.8) lib/action_controller/metal/params_wrapper.rb:207:in `process_action' 
activerecord (3.2.8) lib/active_record/railties/controller_runtime.rb:18:in `process_action' 
actionpack (3.2.8) lib/abstract_controller/base.rb:121:in `process' 
actionpack (3.2.8) lib/abstract_controller/rendering.rb:45:in `process' 
actionpack (3.2.8) lib/action_controller/metal.rb:203:in `dispatch' 
actionpack (3.2.8) lib/action_controller/metal/rack_delegation.rb:14:in `dispatch' 
actionpack (3.2.8) lib/action_controller/metal.rb:246:in `block in action' 
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `call' 
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:73:in `dispatch' 
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:36:in `call' 
journey (1.0.4) lib/journey/router.rb:68:in `block in call' 
journey (1.0.4) lib/journey/router.rb:56:in `each' 
journey (1.0.4) lib/journey/router.rb:56:in `call' 
actionpack (3.2.8) lib/action_dispatch/routing/route_set.rb:600:in `call' 
request_store (1.0.5) lib/request_store/middleware.rb:9:in `call' 
rakismet (1.5.0) lib/rakismet/middleware.rb:10:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call' 
rack (1.4.5) lib/rack/etag.rb:23:in `call' 
rack (1.4.5) lib/rack/conditionalget.rb:35:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/head.rb:14:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/params_parser.rb:21:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/flash.rb:242:in `call' 
rack (1.4.5) lib/rack/session/abstract/id.rb:210:in `context' 
rack (1.4.5) lib/rack/session/abstract/id.rb:205:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/cookies.rb:339:in `call' 
activerecord (3.2.8) lib/active_record/query_cache.rb:64:in `call' 
activerecord (3.2.8) lib/active_record/connection_adapters/abstract/connection_pool.rb:473:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call' 
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `_run__67611987__call__19440801__callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:405:in `__run_callback' 
activesupport (3.2.8) lib/active_support/callbacks.rb:385:in `_run_call_callbacks' 
activesupport (3.2.8) lib/active_support/callbacks.rb:81:in `run_callbacks' 
actionpack (3.2.8) lib/action_dispatch/middleware/callbacks.rb:27:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/reloader.rb:65:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/remote_ip.rb:31:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/show_exceptions.rb:56:in `call' 
railties (3.2.8) lib/rails/rack/logger.rb:26:in `call_app' 
railties (3.2.8) lib/rails/rack/logger.rb:16:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/request_id.rb:22:in `call' 
rack (1.4.5) lib/rack/methodoverride.rb:21:in `call' 
rack (1.4.5) lib/rack/runtime.rb:17:in `call' 
activesupport (3.2.8) lib/active_support/cache/strategy/local_cache.rb:72:in `call' 
rack (1.4.5) lib/rack/lock.rb:15:in `call' 
actionpack (3.2.8) lib/action_dispatch/middleware/static.rb:62:in `call' 
railties (3.2.8) lib/rails/engine.rb:479:in `call' 
railties (3.2.8) lib/rails/application.rb:223:in `call' 
rack (1.4.5) lib/rack/content_length.rb:14:in `call' 
railties (3.2.8) lib/rails/rack/log_tailer.rb:17:in `call' 
rack (1.4.5) lib/rack/handler/webrick.rb:59:in `service' 
/home/mohnish/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service' 
/home/mohnish/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run' 
/home/mohnish/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread' 

내가 정확히 무슨 일이 잘못 모르겠어요. 사진 업로드 기능이 올바르게 작동하도록하기 위해 내가해야 할 일에 대한 조언을 얻을 수 있다면 좋을 것입니다.

답변

0

나는 똑같은 문제에 직면했다. community_engine.gemspec에서 configatron과 paperclip의 버전을 업데이트하면 해결되었습니다.

구성 설정을 ~>2.0으로 설정하고 클립을 ~> 4.1.1으로 설정해보십시오.

+0

답장을 보내 주셔서 감사합니다. 답변을 주셔서 감사 드리며, 코드를 검색하여 변경 사항을 적용 해보십시오. – boddhisattva