orchitech / redmine_reformat

A Swiss-Army Knife for Converting Redmine Rich Text Data
Other
32 stars 6 forks source link

rake aborted wrong number of arguments (given 1, expected 0) #11

Closed liegepr closed 2 years ago

liegepr commented 3 years ago

Hello,

I am using:

/srv/redmine # pandoc -v pandoc 2.9.2.1 Compiled with pandoc-types 1.20, texmath 0.12.0.2, skylighting 0.8.5 Default user data directory: /root/.local/share/pandoc or /root/.pandoc Copyright (C) 2006-2020 John MacFarlane

And:

Redmine version 4.2.3.devel.21268 Ruby version 3.0.2-p107 (2021-07-07) [x86_64-linux] Rails version 6.1.4.1

Using rake 13.0.6 Using RedCloth 4.3.2 Using concurrent-ruby 1.1.9 Using minitest 5.14.4 Using zeitwerk 2.5.1 Using builder 3.2.4 Using mini_mime 1.1.2 Using erubi 1.10.0 Using thor 1.1.0 Using public_suffix 4.0.6 Using bundler 2.2.25 Using chunky_png 1.4.0 Using commonmarker 0.23.1 Using csv 3.2.1 Using method_source 1.0.0 Using mini_magick 4.11.0 Using mysql2 0.5.3 Using rack 2.2.3 Using ruby-openid 2.9.2 Using websocket-extensions 0.1.5 Using redcarpet 3.5.1 Using rexml 3.2.5 Using rotp 6.2.0 Using crass 1.0.6 Using rouge 3.26.1 Using rqrcode_core 1.2.0 Using rubyzip 2.3.2 Using i18n 1.8.11 Using tzinfo 2.0.4 Using mail 2.7.1 Using addressable 2.8.0 Using rack-test 1.1.0 Using passenger 6.0.11 Using sprockets 4.0.2 Using request_store 1.5.0 Using marcel 1.0.2 Using rack-openid 1.4.2 Using activesupport 6.1.4.1 Using rqrcode 2.1.0 Using globalid 0.5.2 Using activemodel 6.1.4.1 Using net-ldap 0.17.0 Using rbpdf-font 1.19.1 Using activerecord 6.1.4.1 Using htmlentities 4.3.4 Using racc 1.6.0 Using nio4r 2.5.8 Using rbpdf 1.20.1 Using nokogiri 1.12.5 (x86_64-linux) Using css_parser 1.10.0 Using activejob 6.1.4.1 Using websocket-driver 0.7.5 Using rails-dom-testing 2.0.3 Using loofah 2.12.0 Using html-pipeline 2.13.2 Using roadie 4.0.0 Using sanitize 6.0.0 Using rails-html-sanitizer 1.4.2 Using actionview 6.1.4.1 Using actionpack 6.1.4.1 Using actioncable 6.1.4.1 Using activestorage 6.1.4.1 Using actionmailer 6.1.4.1 Using railties 6.1.4.1 Using sprockets-rails 3.2.2 Using actionmailbox 6.1.4.1 Using actionpack-xml_parser 2.0.1 Using actiontext 6.1.4.1 Using roadie-rails 2.2.0 Using rails 6.1.4.1

The following command fails:

bundle exec rake --trace reformat:convert to_formatting=markdown dryrun=1 RAILS_ENV=production

/srv/redmine # bundle exec rake --trace reformat:convert to_formatting=markdown dryrun=1 RAILS_ENV=production
** Invoke reformat:convert (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute reformat:convert
rake aborted!
ArgumentError: wrong number of arguments (given 1, expected 0)
/srv/redmine/plugins/redmine_reformat/lib/redmine_reformat/invoker.rb:13:in `initialize'
/srv/redmine/plugins/redmine_reformat/lib/tasks/reformat.rake:11:in `new'
/srv/redmine/plugins/redmine_reformat/lib/tasks/reformat.rake:11:in `block (2 levels) in <top (required)>'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:83:in `block in run'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/lib/rake/application.rb:80:in `run'
/usr/local/rvm/rubies/ruby-3.0.2/lib/ruby/gems/3.0.0/gems/rake-13.0.6/exe/rake:27:in `<top (required)>'
/usr/local/rvm/rubies/ruby-3.0.2/bin/rake:23:in `load'
/usr/local/rvm/rubies/ruby-3.0.2/bin/rake:23:in `<main>'
/usr/local/rvm/gems/ruby-3.0.2/bin/ruby_executable_hooks:22:in `eval'
/usr/local/rvm/gems/ruby-3.0.2/bin/ruby_executable_hooks:22:in `<main>'

By the way, running "bundle install" doesn't seem to install any gems.

I have no ideas about what's going wrong.

martincizek commented 3 years ago

I guess it's because of:

Redmine version 4.2.3.devel.21268

which is apparently:

Using rails 6.1.4.1

The officially released Redmine 4.2.3 should work.