danmunn / redmine_dmsf

Fork of svn repository for redmine_dmsf
GNU General Public License v2.0
413 stars 193 forks source link

Convert documents fails #1448

Closed Rocksau80 closed 1 year ago

Rocksau80 commented 1 year ago

I'm trying to run the (test for) conversion from standard redmine files and documents to DMSF via rake redmine:dmsf_convert_documents issues=1 dry_run=1 RAILS_ENV="production" The creation of the files always fails with that message: Dry run file: filename.png Creating file: filename.png failed private methodsystem' called for nil:NilClass`

Environment: Redmine version 5.0.5.stable Ruby version 3.0.2-p107 (2021-07-07) [x86_64-linux-gnu] Rails version 6.1.7.2 Environment production Database adapter Mysql2 Mailer queue ActiveJob::QueueAdapters::AsyncAdapter DMSF 3.0.12

What do I miss?

picman commented 1 year ago

Could you provide what is in the production.log?

Rocksau80 commented 1 year ago

In production.log I can only see entries belonging to the "normal workload". There is nothing added if I start the dry run of the conversion.

picman commented 1 year ago

ok

Rocksau80 commented 1 year ago

To check if this is a permission issue I just uploaded and edited files through the original process in the frontend. That's going without flaws.

picman commented 1 year ago

Fixed.

Rocksau80 commented 1 year ago

Thank you very much. I'll try devel branch later today.

Rocksau80 commented 1 year ago

I downloaded files from devel branch and put them into plugin folder. Then I run bundle install bundle update and after that bundle exec rake db:migrate RAILS_ENV=production which gives me the same error as RAILS_ENV=production bundle exec rake redmine:plugins:migrate NAME=redmine_dmsf

rake aborted! NameError: uninitialized constant DmsfFolder::RedmineDmsf /var/www/redmine/plugins/redmine_dmsf/app/models/dmsf_folder.rb:24:in <class:DmsfFolder>' /var/www/redmine/plugins/redmine_dmsf/app/models/dmsf_folder.rb:23:in<top (required)>' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:inrequire' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:30:in require' /var/www/redmine/plugins/redmine_dmsf/app/validators/dmsf_file_name_validator.rb:24:in' /var/www/redmine/plugins/redmine_dmsf/app/validators/dmsf_file_name_validator.rb:23:in <top (required)>' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:inrequire' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:inrequire' /var/www/redmine/plugins/redmine_dmsf/lib/redmine_dmsf.rb:26:in <top (required)>' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:inrequire' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:inrequire' /var/www/redmine/plugins/redmine_dmsf/after_init.rb:25:in <top (required)>' /var/www/redmine/plugins/redmine_dmsf/init.rb:70:inrequire_relative' /var/www/redmine/plugins/redmine_dmsf/init.rb:70:in <top (required)>' /var/www/redmine/lib/redmine/plugin_loader.rb:31:inload' /var/www/redmine/lib/redmine/plugin_loader.rb:31:in run_initializer' /var/www/redmine/lib/redmine/plugin_loader.rb:108:ineach' /var/www/redmine/lib/redmine/plugin_loader.rb:108:in block in load' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:427:ininstance_exec' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:427:in block in make_lambda' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:198:inblock (2 levels) in halting' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:604:in block (2 levels) in default_terminator' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:603:incatch' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:603:in block in default_terminator' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:199:inblock in halting' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:512:in block in invoke_before' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:512:ineach' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:512:in invoke_before' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/callbacks.rb:105:inrun_callbacks' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/reloader.rb:88:in prepare!' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.2/lib/rails/application/finisher.rb:124:inblock in ' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.2/lib/rails/initializable.rb:32:in instance_exec' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.2/lib/rails/initializable.rb:32:inrun' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.2/lib/rails/initializable.rb:61:in block in run_initializers' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.2/lib/rails/initializable.rb:60:inrun_initializers' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.2/lib/rails/application.rb:391:in initialize!' /var/www/redmine/config/environment.rb:16:in<top (required)>' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:in require' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/polyglot-0.3.5/lib/polyglot.rb:65:inrequire' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/zeitwerk-2.6.8/lib/zeitwerk/kernel.rb:38:in require' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:332:inblock in require' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:299:in load_dependency' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/activesupport-6.1.7.2/lib/active_support/dependencies.rb:332:inrequire' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.2/lib/rails/application.rb:367:in require_environment!' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/railties-6.1.7.2/lib/rails/application.rb:533:inblock in run_tasks_blocks' /var/www/redmine/vendor/bundle/ruby/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>' Tasks: TOP => db:migrate => db:load_config => environment

My gems: Using rake 13.0.6 Using concurrent-ruby 1.2.2 Using nio4r 2.5.9 Fetching zeitwerk 2.6.8 (was 2.6.7) Using builder 3.2.4 Using marcel 1.0.2 Using racc 1.6.2 Using crass 1.0.6 Using method_source 1.0.0 Using polyglot 0.3.5 Using rainbow 3.1.1 Using bundler 2.4.12 Using render_async 2.1.11 Using rexml 3.2.5 Fetching temple 0.10.2 (was 0.10.0) Using minitest 5.18.0 Using websocket-extensions 0.1.5 Using tanuki_emoji 0.6.0 Using public_suffix 5.0.1 Using chunky_png 1.4.0 Using commonmarker 0.23.9 Using csv 3.2.6 Using digest 3.1.1 Using htmlentities 4.3.4 Using mini_magick 4.11.0 Using mysql2 0.5.5 Using timeout 0.3.2 Using strscan 3.0.6 Using net-ldap 0.17.1 Using tilt 2.1.0 Using ox 2.14.16 Using rbpdf-font 1.19.1 Fetching thor 1.2.2 (was 1.2.1) Using rotp 6.2.2 Using rouge 3.28.0 Using rqrcode_core 1.2.0 Using rubyzip 2.3.2 Using uuidtools 2.2.0 Using xapian-ruby 1.4.22 Using erubi 1.12.0 Using i18n 1.10.0 Using tzinfo 2.0.6 Using nokogiri 1.13.10 (x86_64-linux) Using rss 0.2.9 Using websocket-driver 0.7.5 Using addressable 2.8.4 Using net-protocol 0.2.1 Using rbpdf 1.21.1 Using redcarpet 3.5.1 Fetching loofah 2.21.3 (was 2.20.0) Using mini_mime 1.1.2 Using css_parser 1.14.0 Using net-imap 0.2.3 Using net-pop 0.1.2 Using net-smtp 0.3.3 Fetching rqrcode 2.2.0 (was 2.1.2) Fetching rack 2.2.7 (was 2.2.6.4) Using sanitize 6.0.1 Using zip-zip 0.3 Using mail 2.7.1 Using roadie 5.1.0 Installing zeitwerk 2.6.8 (was 2.6.7) Installing temple 0.10.2 (was 0.10.0) Installing rqrcode 2.2.0 (was 2.1.2) Installing loofah 2.21.3 (was 2.20.0) Installing thor 1.2.2 (was 1.2.1) Installing rack 2.2.7 (was 2.2.6.4) Using rails-html-sanitizer 1.5.0 Using activesupport 6.1.7.2 Using rails-dom-testing 2.0.3 Using globalid 1.1.0 Using activemodel 6.1.7.2 Using html-pipeline 2.13.2 Using actionview 6.1.7.2 Using deckar01-task_list 2.3.2 Using jbuilder 2.11.5 Using activerecord 6.1.7.2 Using simple_enum 2.3.2 Using active_record_union 1.3.0 Using acts-as-taggable-on 9.0.1 Using awesome_nested_set 3.5.0 Using activejob 6.1.7.2 Using haml 6.1.1 Fetching slim 5.1.1 (was 5.1.0) Using sprockets 4.2.0 Using request_store 1.5.1 Using rack-test 2.1.0 Using actionpack 6.1.7.2 Using actioncable 6.1.7.2 Using activestorage 6.1.7.2 Using actionmailer 6.1.7.2 Using railties 6.1.7.2 Using sprockets-rails 3.4.2 Using actionmailbox 6.1.7.2 Using actionpack-xml_parser 2.0.1 Using actiontext 6.1.7.2 Using deface 1.9.0 Using rails 6.1.7.2 Using roadie-rails 3.0.0 Using haml-rails 2.1.0 Using redmine_plugin_kit 1.0.4 Using additional_tags 1.0.7 from source at . Installing slim 5.1.1 (was 5.1.0) Using slim-rails 3.6.2 Using additionals 3.0.8 from source at .