alphanodes / additionals

Redmine plugin for easy customization of settings, text and content display by using personal or role-based dashboards (drag&drop), providing wiki macros and act as library for other plugins.
https://www.redmine.org/plugins/additionals
GNU General Public License v2.0
131 stars 43 forks source link

Plugin & Docker installation #135

Closed vorobyev-aleksandr closed 2 years ago

vorobyev-aleksandr commented 2 years ago

Hi all!

Using docker image redmine:5.0 I get an error during installation. How can you decide?

Your Gemfile lists the gem puma (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Resolving dependencies...
Bundler can't satisfy your Gemfile's dependencies.
Install missing gems with `bundle install`.
Your Gemfile lists the gem puma (>= 0) more than once.
You should probably keep only one of them.
Remove any duplicate entries and specify the gem only once.
While it's not a problem now, it could cause errors if you change the version of one of them later.
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Using rake 13.0.6
Using zeitwerk 2.5.4
Using builder 3.2.4
Using erubi 1.10.0
Using racc 1.6.0
Using crass 1.0.6
Using rack 2.2.3
Using nio4r 2.5.8
Using websocket-extensions 0.1.5
Using marcel 1.0.2
Using mini_mime 1.1.2
Using method_source 1.0.0
Using thor 1.2.1
Using concurrent-ruby 1.1.10
Using bundler 2.3.7
Using minitest 5.15.0
Using rexml 3.2.5
Fetching temple 0.8.2
Fetching tilt 2.0.10
Fetching gemoji 3.0.1
Fetching polyglot 0.3.5
Fetching rainbow 3.1.1
Fetching render_async 2.1.11
Using chunky_png 1.4.0
Using commonmarker 0.23.1
Using csv 3.2.3
Using digest 3.1.0
Using htmlentities 4.3.4
Using mini_magick 4.11.0
Using timeout 0.2.0
Using strscan 3.0.1
Using net-ldap 0.17.0
Using pg 1.2.3
Using rbpdf-font 1.19.1
Using redcarpet 3.5.1
Using rotp 6.2.0
Using rouge 3.28.0
Using rqrcode_core 1.2.0
Using rubyzip 2.3.2
Using i18n 1.10.0
Using tzinfo 2.0.4
Using public_suffix 4.0.7
Using rack-test 1.1.0
Using nokogiri 1.13.4 (x86_64-linux)
Using sprockets 4.0.3
Using rss 0.2.9
Using puma 5.6.4
Using request_store 1.5.1
Using mail 2.7.1
Using net-protocol 0.1.3
Using rbpdf 1.20.1
Using websocket-driver 0.7.5
Using rqrcode 2.1.1
Using activesupport 6.1.4.7
Using addressable 2.8.0
Using loofah 2.16.0
Using net-imap 0.2.3
Using net-smtp 0.3.1
Using sanitize 6.0.0
Using rails-dom-testing 2.0.3
Using net-pop 0.1.1
Using globalid 1.0.0
Using activemodel 6.1.4.7
Using html-pipeline 2.13.2
Using rails-html-sanitizer 1.4.2
Using css_parser 1.11.0
Using activejob 6.1.4.7
Using activerecord 6.1.4.7
Using deckar01-task_list 2.3.2
Using actionview 6.1.4.7
Using roadie 5.0.0
Using actionpack 6.1.4.7
Using actioncable 6.1.4.7
Using activestorage 6.1.4.7
Using actionmailer 6.1.4.7
Using railties 6.1.4.7
Using sprockets-rails 3.4.2
Using actiontext 6.1.4.7
Using actionmailbox 6.1.4.7
Using actionpack-xml_parser 2.0.1
Using roadie-rails 3.0.0
Using rails 6.1.4.7
Installing polyglot 0.3.5
Installing render_async 2.1.11
Installing tilt 2.0.10
Installing temple 0.8.2
Installing rainbow 3.1.1
Installing gemoji 3.0.1
Fetching deface 1.8.2
Fetching slim 4.1.0
Installing deface 1.8.2
Installing slim 4.1.0
Fetching redmine_plugin_kit 1.0.2
Fetching slim-rails 3.4.0
Installing redmine_plugin_kit 1.0.2
Installing slim-rails 3.4.0
Using additionals 3.0.5.2 from source at `.`
Bundle complete! 44 Gemfile dependencies, 87 gems now installed.
Gems in the groups 'development' and 'test' were not installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
W, [2022-05-01T11:52:25.697918 #35]  WARN -- : Creating scope :system. Overwriting existing method Enumeration.system.
W, [2022-05-01T11:52:25.855993 #35]  WARN -- : Creating scope :sorted. Overwriting existing method User.sorted.
W, [2022-05-01T11:52:25.888186 #35]  WARN -- : Creating scope :visible. Overwriting existing method Principal.visible.
W, [2022-05-01T11:52:33.898147 #37]  WARN -- : Creating scope :system. Overwriting existing method Enumeration.system.
W, [2022-05-01T11:52:34.028277 #37]  WARN -- : Creating scope :sorted. Overwriting existing method User.sorted.
W, [2022-05-01T11:52:34.045026 #37]  WARN -- : Creating scope :visible. Overwriting existing method Principal.visible.
=> Booting Puma
=> Rails 6.1.4.7 application starting in production
=> Run `bin/rails server --help` for more startup options
W, [2022-05-01T11:52:41.757656 #1]  WARN -- : Creating scope :system. Overwriting existing method Enumeration.system.
W, [2022-05-01T11:52:41.913380 #1]  WARN -- : Creating scope :sorted. Overwriting existing method User.sorted.
W, [2022-05-01T11:52:41.931445 #1]  WARN -- : Creating scope :visible. Overwriting existing method Principal.visible.
W, [2022-05-01T11:52:42.040842 #1]  WARN -- : DEPRECATION WARNING: Application#self.accept_rss_auth is deprecated and will be removed in Redmine 6.0. Please use #self.accept_atom_auth instead. (called from <class:DashboardsController> at /usr/src/redmine/plugins/additionals/app/controllers/dashboards_controller.rb:9)
Exiting
/usr/src/redmine/app/controllers/application_controller.rb:637:in `accept_rss_auth': undefined method `accept_atom_auth' for Class:Class (NoMethodError)

    self.class.accept_atom_auth(*actions)
              ^^^^^^^^^^^^^^^^^
        from /usr/src/redmine/plugins/additionals/app/controllers/dashboards_controller.rb:9:in `<class:DashboardsController>'
        from /usr/src/redmine/plugins/additionals/app/controllers/dashboards_controller.rb:3:in `<top (required)>'
        from /usr/local/bundle/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
        from /usr/local/bundle/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:27:in `require'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader/helpers.rb:95:in `const_get'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader/helpers.rb:95:in `cget'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader.rb:237:in `block (2 levels) in eager_load'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader/helpers.rb:26:in `block in ls'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader/helpers.rb:18:in `each_child'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader/helpers.rb:18:in `ls'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader.rb:232:in `block in eager_load'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader.rb:217:in `synchronize'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader.rb:217:in `eager_load'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader.rb:317:in `each'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/loader.rb:317:in `eager_load_all'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/application/finisher.rb:133:in `block in <module:Finisher>'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/initializable.rb:32:in `instance_exec'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/initializable.rb:32:in `run'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/initializable.rb:61:in `block in run_initializers'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:228:in `block in tsort_each'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `each'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `call'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:226:in `tsort_each'
        from /usr/local/lib/ruby/3.1.0/tsort.rb:205:in `tsort_each'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/initializable.rb:60:in `run_initializers'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/application.rb:391:in `initialize!'
        from /usr/src/redmine/config/environment.rb:16:in `<top (required)>'
        from /usr/local/bundle/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
        from /usr/local/bundle/gems/polyglot-0.3.5/lib/polyglot.rb:65:in `require'
        from /usr/local/bundle/gems/zeitwerk-2.5.4/lib/zeitwerk/kernel.rb:35:in `require'
        from /usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:332:in `block in require'
        from /usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:299:in `load_dependency'
        from /usr/local/bundle/gems/activesupport-6.1.4.7/lib/active_support/dependencies.rb:332:in `require'
        from config.ru:3:in `block in <main>'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `eval'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:116:in `new_from_string'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:105:in `load_file'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/builder.rb:66:in `parse_file'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:349:in `build_app_and_options_from_config'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:249:in `app'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:422:in `wrapped_app'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:312:in `block in start'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:379:in `handle_profiling'
        from /usr/local/bundle/gems/rack-2.2.3/lib/rack/server.rb:311:in `start'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/commands/server/server_command.rb:39:in `start'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/commands/server/server_command.rb:144:in `block in perform'
        from <internal:kernel>:90:in `tap'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/commands/server/server_command.rb:135:in `perform'
        from /usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
        from /usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
        from /usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/command/base.rb:69:in `perform'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/command.rb:48:in `invoke'
        from /usr/local/bundle/gems/railties-6.1.4.7/lib/rails/commands.rb:18:in `<top (required)>'
        from bin/rails:4:in `require'
        from bin/rails:4:in `<main>'
alexandermeindl commented 2 years ago

Hi @vorobyev-aleksandr,

latest version of additionals main branch should not have this bug. Please try it and let me know, if your problem is solved with it.

vorobyev-aleksandr commented 2 years ago

Alexander @alexandermeindl, thank you for your answer!

I am using comman from install instruction: git clone -b stable https://github.com/AlphaNodes/additionals.git plugins/additionals

What branch should be used to avoid such an error?

vorobyev-aleksandr commented 2 years ago

From main branch work fine!

Thank you very much!

ohuseyinoglu commented 2 years ago

Yes, I can also confirm getting the plugin from main branch works. But I wanted add a couple of notes/questions hoping you don't mind for a closed issue! :)

ohuseyinoglu commented 2 years ago

Just a quick FYI: I've debugged further, and logged that "container going crazy" issue (in my second bullet point above) in the <Docker "Official Image" for redmine> repo: 267

alexandermeindl commented 2 years ago

Hi @ohuseyinoglu, did you try latest version of main branch? Maybe you have the same problem as #138. This should be fixed now.

ohuseyinoglu commented 2 years ago

Hi @alexandermeindl , Thanks for following up. The fix mentioned here did fix the particular "undefined method" problem as I've confirmed in my first comment above.

My environment had much bigger issue that doesn't have anything to do with additionals (or emojis) as I've reported to "Docker official image" repo. Just restarting the container (after plugin install, or just for a fresh start while keeping the changes in the environment) was messing thing up (deleting gems, javascript, css files). You're partially right in your assumption that the fix for #138 would help (since a write on a folder ("public") with other content) would be eliminated, and therefore the issue I'm facing could be avoided), but it turns out redmine itself creates that public/plugin_assets folder there in its first run, so the other contents of that folder are removed during the first restart cycle anyway because of the issue I'm facing.