stpl / csv_import_issues

Redmine plugin that allows importing of issues via CSV allowing user to map columns of csv to issue attributes.
10 stars 15 forks source link

Internal Error #20

Open ElskerDane opened 9 years ago

ElskerDane commented 9 years ago

I believe that I have successfully installed your plugin; however, when I attempt to import a CSV file (even the sample file), I get an internal error.

My environment is: Redmine 3.0.3, Ruby 2.0.0, Rails 4.2, Windows 7

This is the error I see in my production log:

Started GET "/projects/testing-importer-3/csv_imports/download.csv" for ::1 at 2015-06-16 13:08:45 -0400 Processing by CsvImportsController#download as CSV Parameters: {"project_id"=>"testing-importer-3"} Current user: admin (id=1) Rendered plugins/csv_import_issues/app/views/csv_imports/download.csv.erb (1.0ms) Completed 200 OK in 214ms (Views: 172.0ms | ActiveRecord: 17.0ms) Started POST "/projects/testing-importer-3/csv_imports" for ::1 at 2015-06-16 13:09:04 -0400 Processing by CsvImportsController#create as HTML Parameters: {"utf8"=>"✓", "authenticity_token"=>"Fs3sw2KRwtZ8bjGKQO6L9g2r9coAiA2lwp8xOnwASZUoqfAJfblf1niUP25yD2V52MKIPkG+C0aRZOizPK8lfw==", "csv_import"=>{"csv"=>#<ActionDispatch::Http::UploadedFile:0x53bdc28 @tempfile=#<Tempfile:C:/Users/J40419/AppData/Local/Temp/RackMultipart20150616-3696-afqhmy.csv>, @original_filename="sample.csv", @content_type="text/csv", @headers="Content-Disposition: form-data; name=\"csv_import[csv]\"; filename=\"sample.csv\"\r\nContent-Type: text/csv\r\n">}, "commit"=>"Import CSV", "project_id"=>"testing-importer-3"} Current user: admin (id=1) Completed 500 Internal Server Error in 65ms (ActiveRecord: 13.0ms)

NoMethodError (undefined method call' for "result == false":String): activesupport (4.2.1) lib/active_support/callbacks.rb:165:inblock in halting' activesupport (4.2.1) lib/active_support/callbacks.rb:504:in call' activesupport (4.2.1) lib/active_support/callbacks.rb:504:inblock in call' activesupport (4.2.1) lib/active_support/callbacks.rb:504:in each' activesupport (4.2.1) lib/active_support/callbacks.rb:504:incall' activesupport (4.2.1) lib/active_support/callbacks.rb:92:in _run_callbacks' activesupport (4.2.1) lib/active_support/callbacks.rb:776:in_run_csv_post_process_callbacks' activesupport (4.2.1) lib/active_support/callbacks.rb:81:in run_callbacks' paperclip (3.5.2) lib/paperclip/callbacks.rb:26:inrun_paperclip_callbacks' paperclip (3.5.2) lib/paperclip/attachment.rb:414:in block in post_process' activesupport (4.2.1) lib/active_support/callbacks.rb:88:incall' activesupport (4.2.1) lib/active_support/callbacks.rb:88:in _run_callbacks' activesupport (4.2.1) lib/active_support/callbacks.rb:776:in_run_post_process_callbacks' activesupport (4.2.1) lib/active_support/callbacks.rb:81:in run_callbacks' paperclip (3.5.2) lib/paperclip/callbacks.rb:26:inrun_paperclip_callbacks' paperclip (3.5.2) lib/paperclip/attachment.rb:413:in post_process' paperclip (3.5.2) lib/paperclip/attachment.rb:112:inassign' paperclip (3.5.2) lib/paperclip/has_attached_file.rb:65:in block in define_setter' plugins/csv_import_issues/app/models/csv_import.rb:18:inblock in initialize' actionpack (4.2.1) lib/action_controller/metal/strong_parameters.rb:183:in each_pair' actionpack (4.2.1) lib/action_controller/metal/strong_parameters.rb:183:ineach_pair' plugins/csv_import_issues/app/models/csv_import.rb:18:in initialize' plugins/csv_import_issues/app/controllers/csv_imports_controller.rb:38:innew' plugins/csv_import_issues/app/controllers/csv_imports_controller.rb:38:in validate_csv' activesupport (4.2.1) lib/active_support/callbacks.rb:432:inblock in make_lambda' activesupport (4.2.1) lib/active_support/callbacks.rb:145:in call' activesupport (4.2.1) lib/active_support/callbacks.rb:145:inblock in halting_and_conditional' activesupport (4.2.1) lib/active_support/callbacks.rb:504:in call' activesupport (4.2.1) lib/active_support/callbacks.rb:504:inblock in call' activesupport (4.2.1) lib/active_support/callbacks.rb:504:in each' activesupport (4.2.1) lib/active_support/callbacks.rb:504:incall' activesupport (4.2.1) lib/active_support/callbacks.rb:92:in _run_callbacks' activesupport (4.2.1) lib/active_support/callbacks.rb:776:in_run_process_action_callbacks' activesupport (4.2.1) lib/active_support/callbacks.rb:81:in run_callbacks' actionpack (4.2.1) lib/abstract_controller/callbacks.rb:19:inprocess_action' actionpack (4.2.1) lib/action_controller/metal/rescue.rb:29:in process_action' actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:32:inblock in process_action' activesupport (4.2.1) lib/active_support/notifications.rb:164:in block in instrument' activesupport (4.2.1) lib/active_support/notifications/instrumenter.rb:20:ininstrument' activesupport (4.2.1) lib/active_support/notifications.rb:164:in instrument' actionpack (4.2.1) lib/action_controller/metal/instrumentation.rb:30:inprocess_action' actionpack (4.2.1) lib/action_controller/metal/params_wrapper.rb:250:in process_action' activerecord (4.2.1) lib/active_record/railties/controller_runtime.rb:18:inprocess_action' actionpack (4.2.1) lib/abstract_controller/base.rb:137:in process' actionview (4.2.1) lib/action_view/rendering.rb:30:inprocess' actionpack (4.2.1) lib/action_controller/metal.rb:196:in dispatch' actionpack (4.2.1) lib/action_controller/metal/rack_delegation.rb:13:indispatch' actionpack (4.2.1) lib/action_controller/metal.rb:237:in block in action' actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:incall' actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:74:in dispatch' actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:43:inserve' actionpack (4.2.1) lib/action_dispatch/journey/router.rb:43:in block in serve' actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:ineach' actionpack (4.2.1) lib/action_dispatch/journey/router.rb:30:in serve' actionpack (4.2.1) lib/action_dispatch/routing/route_set.rb:819:incall' rack-openid (1.4.2) lib/rack/openid.rb:98:in call' request_store (1.0.5) lib/request_store/middleware.rb:9:incall' rack (1.6.1) lib/rack/etag.rb:24:in call' rack (1.6.1) lib/rack/conditionalget.rb:38:incall' rack (1.6.1) lib/rack/head.rb:13:in call' actionpack-xml_parser (1.0.2) lib/action_dispatch/xml_params_parser.rb:16:incall' actionpack (4.2.1) lib/action_dispatch/middleware/params_parser.rb:27:in call' actionpack (4.2.1) lib/action_dispatch/middleware/flash.rb:260:incall' rack (1.6.1) lib/rack/session/abstract/id.rb:225:in context' rack (1.6.1) lib/rack/session/abstract/id.rb:220:incall' actionpack (4.2.1) lib/action_dispatch/middleware/cookies.rb:560:in call' activerecord (4.2.1) lib/active_record/query_cache.rb:36:incall' activerecord (4.2.1) lib/active_record/connection_adapters/abstract/connection_pool.rb:649:in call' actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:29:inblock in call' activesupport (4.2.1) lib/active_support/callbacks.rb:88:in call' activesupport (4.2.1) lib/active_support/callbacks.rb:88:in_run_callbacks' activesupport (4.2.1) lib/active_support/callbacks.rb:776:in _run_call_callbacks' activesupport (4.2.1) lib/active_support/callbacks.rb:81:inrun_callbacks' actionpack (4.2.1) lib/action_dispatch/middleware/callbacks.rb:27:in call' actionpack (4.2.1) lib/action_dispatch/middleware/remote_ip.rb:78:incall' actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:17:in call' actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:incall' railties (4.2.1) lib/rails/rack/logger.rb:38:in call_app' railties (4.2.1) lib/rails/rack/logger.rb:20:inblock in call' activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in block in tagged' activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:intagged' activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in tagged' railties (4.2.1) lib/rails/rack/logger.rb:20:incall' actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in call' rack (1.6.1) lib/rack/methodoverride.rb:22:incall' rack (1.6.1) lib/rack/runtime.rb:18:in call' activesupport (4.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:incall' actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in call' rack (1.6.1) lib/rack/sendfile.rb:113:incall' railties (4.2.1) lib/rails/engine.rb:518:in call' railties (4.2.1) lib/rails/application.rb:164:incall' rack (1.6.1) lib/rack/lock.rb:17:in call' rack (1.6.1) lib/rack/content_length.rb:15:incall' rack (1.6.1) lib/rack/handler/webrick.rb:89:in service' C:/Ruby200/lib/ruby/2.0.0/webrick/httpserver.rb:138:inservice' C:/Ruby200/lib/ruby/2.0.0/webrick/httpserver.rb:94:in run' C:/Ruby200/lib/ruby/2.0.0/webrick/server.rb:295:inblock in start_thread'

vrstud commented 9 years ago

I am experiencing the same problem. I was able to install the plugin and get it up and running but I am not able to import a template. I have the same error message above. The environment I am using is a bitnami install with the following parameters: Environment: Redmine version 3.0.3.stable Ruby version 2.0.0-p645 (2015-04-13) [i386-mingw32] Rails version 4.2.1 Environment production Database adapter Mysql2 SCM: Subversion 1.8.11 Git 1.9.5 Filesystem
Redmine plugins: csv_import_issues 0.0.2

I believe the problem lies with an incompatibility between paperclip 3.5.2 and Rails 4.2. I've tried newer versions of paperclip without success. Any help would be appreciated.

voko commented 9 years ago

Same here:

Environment: Redmine version 3.0.3.stable Ruby version 2.0.0-p645 (2015-04-13) [x86_64-linux] Rails version 4.2.1 Environment production Database adapter Mysql2 SCM: Subversion 1.8.13 Git 1.9.5 Filesystem
Redmine plugins: csv_import_issues 0.0.2 redmine_agile 1.3.9

I'm completely new to redmine, ruby and such (yet not to programming;), so I can't provide any additional ideas.

fastuser commented 9 years ago

Same Here: Redmine 3.1.0 csv_import_issues 0.0.2

Started GET "/projects/test-project/csv_imports/new" for 10.0.0.93 at 2015-10-06 02:20:51 +0000
Processing by CsvImportsController#new as HTML
  Parameters: {"project_id"=>"test-project"}
  Current user: <user.name> (id=5)
  Rendered plugins/csv_import_issues/app/views/csv_imports/new.html.erb within layouts/base (1.1ms)
Completed 200 OK in 39ms (Views: 25.0ms | ActiveRecord: 4.4ms)
Started POST "/projects/test-project/csv_imports" for 10.0.0.93 at 2015-10-06 02:21:11 +0000
Processing by CsvImportsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"P0/kp10AUzugVBDDQF9eu12AUG4qvmHvC2Lwj7wbJabeuZsi/YyNEWK2VqH/jCmYUmq8KOlDP8nFqE2g4Fx4xw==", "csv_import"=>{"csv"=>#<ActionDispatch::Http::UploadedFile:0x007fc7898bf530 @tempfile=#<Tempfile:/tmp/RackMultipart20151006-11509-743jjf.csv>, @original_filename="sample2.csv", @content_type="text/csv", @headers="Content-Disposition: form-data; name=\"csv_import[csv]\"; filename=\"sample2.csv\"\r\nContent-Type: text/csv\r\n">}, "commit"=>"Import CSV", "project_id"=>"test-project"}
  Current user: <user.name> (id=5)
Completed 500 Internal Server Error in 20ms (ActiveRecord: 2.9ms)

NoMethodError (undefined method `call' for "result == false":String):
  lib/redmine/sudo_mode.rb:63:in `sudo_mode'