Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Ruby 2.7] [Redmine 4.2.x] [Additionals 3.0.5.2] Warnings when starting Redmine 4.2.x with Additionals 3.0.5.2 (using Puma) #156

Open
danowar2k opened this issue Feb 1, 2023 · 3 comments

Comments

@danowar2k
Copy link

danowar2k commented Feb 1, 2023

I don't know if this is removed in later versions, but I've installed Additionals 3.0.5.2 on my Redmine 4.2.8, and when starting the service my logs say

Feb 01 19:50:52 dev-redmine systemd[1]: Starting Redmine Issue Tracker on Puma...
Feb 01 19:50:52 dev-redmine bundle[2668525]: [2668525] Puma starting in cluster mode...
Feb 01 19:50:52 dev-redmine bundle[2668525]: [2668525] * Version 4.3.12 (ruby 2.7.6-p219), codename: Mysterious Traveller
Feb 01 19:50:52 dev-redmine bundle[2668525]: [2668525] * Min threads: 0, max threads: 16
Feb 01 19:50:52 dev-redmine bundle[2668525]: [2668525] * Environment: production
Feb 01 19:50:52 dev-redmine bundle[2668525]: [2668525] * Process workers: 5
Feb 01 19:50:52 dev-redmine bundle[2668525]: [2668525] * Preloading application
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/code/4.2.8/plugins/additionals/lib/additionals.rb:6: warning: already initialized constant Additionals::MAX_CUSTOM_MENU_ITEMS
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/plugins/additionals/3.0.5.2/lib/additionals.rb:6: warning: previous definition of MAX_CUSTOM_MENU_ITEMS was here
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/code/4.2.8/plugins/additionals/lib/additionals.rb:7: warning: already initialized constant Additionals::SELECT2_INIT_ENTRIES
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/plugins/additionals/3.0.5.2/lib/additionals.rb:7: warning: previous definition of SELECT2_INIT_ENTRIES was here
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/code/4.2.8/plugins/additionals/lib/additionals.rb:8: warning: already initialized constant Additionals::API_LIMIT
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/plugins/additionals/3.0.5.2/lib/additionals.rb:8: warning: previous definition of API_LIMIT was here
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/code/4.2.8/plugins/additionals/lib/additionals.rb:9: warning: already initialized constant Additionals::DEFAULT_MODAL_WIDTH
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/plugins/additionals/3.0.5.2/lib/additionals.rb:9: warning: previous definition of DEFAULT_MODAL_WIDTH was here
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/code/4.2.8/plugins/additionals/lib/additionals.rb:10: warning: already initialized constant Additionals::GOTO_LIST
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/plugins/additionals/3.0.5.2/lib/additionals.rb:10: warning: previous definition of GOTO_LIST was here
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/code/4.2.8/plugins/additionals/lib/additionals.rb:11: warning: already initialized constant Additionals::LIST_SEPARATOR
Feb 01 19:50:53 dev-redmine bundle[2668525]: /var/redmine/plugins/additionals/3.0.5.2/lib/additionals.rb:11: warning: previous definition of LIST_SEPARATOR was here

I install Redmine plugins by linking the version directories inside the Redmine plugins dir. Is that bad practice or why does it seem like the additionals plugin sees redefinitions by both looking at the real plugin dir and the symlinked dir?

Meaning: /var/redmine/code/4.2.8/plugins/additionals is a symlink to /var/redmine/plugins/additionals/3.0.5.2

@danowar2k danowar2k changed the title Warnings when starting Redmine 4.2.x with Additionals 1.0.4 (using Puma) [Ruby 2.7] [Redmine 4.2.x] [Additionals 1.0.4] Warnings when starting Redmine 4.2.x with Additionals 1.0.4 (using Puma) Feb 1, 2023
@danowar2k danowar2k changed the title [Ruby 2.7] [Redmine 4.2.x] [Additionals 1.0.4] Warnings when starting Redmine 4.2.x with Additionals 1.0.4 (using Puma) [Ruby 2.7] [Redmine 4.2.x] [Additionals 3.0.5.2] Warnings when starting Redmine 4.2.x with Additionals 3.0.5.2 (using Puma) Feb 1, 2023
@danowar2k
Copy link
Author

Sorry, I'm using additional_tags, too, so I botched the version number.

@alexandermeindl
Copy link
Collaborator

alexandermeindl commented Feb 3, 2023

Hi @danowar2k,
I cannot reproduce this warnings with the current additionals version and ruby 2.7.6. I also used symlinks for testing.

RAILS_ENV=production RUBYOPT='' rails s
=> Booting Puma
=> Rails 6.1.7.2 application starting in production
=> Run `bin/rails server --help` for more startup options
[17461] Puma starting in cluster mode...
[17461] * Puma version: 6.0.2 (ruby 2.7.6-p219) ("Sunflower")
[17461] *  Min threads: 2
[17461] *  Max threads: 5
[17461] *  Environment: production
[17461] *   Master PID: 17461
[17461] *      Workers: 2
[17461] *     Restarts: (✔) hot (✖) phased
[17461] * Preloading application
[17461] * Listening on http://0.0.0.0:3000
[17461] Use Ctrl-C to stop
[17461] - Worker 0 (PID: 17479) booted in 0.01s, phase: 0
[17461] - Worker 1 (PID: 17481) booted in 0.0s, phase: 0

Can you try it with the latest additionals version?

PS: we do not offer support for old version with Redmine 4.x.

@danowar2k
Copy link
Author

With Redmine 5.0.4 on Ruby 3.0 and additionals 3.0.8, the messages don't crop up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants