HugoHasenbein / redmine_more_previews

Redmine plugin to preview various file types in redmine's preview pane
https://www.redmine.org/plugins/redmine_more_previews
GNU General Public License v2.0
46 stars 15 forks source link

Works well, but warnings on server start #45

Open chekka opened 2 years ago

chekka commented 2 years ago

Previews are working well (PDF, DOCX, etc.) but I get some warnings while puma server ist starting.

/var/www/.../plugins/redmine_more_previews/converters/cliff/lib/cliff.rb:264: warning: already initialized constant Cliff::UNSAFETAGS
/var/www/.../plugins/redmine_more_previews/converters/cliff/lib/cliff.rb:264: warning: previous definition of UNSAFETAGS was here
/var/www/.../plugins/redmine_more_previews/converters/libre/lib/libre.rb:27: warning: already initialized constant Libre::LIBRE_OFFICE_BIN
/var/www/.../plugins/redmine_more_previews/converters/libre/lib/libre.rb:27: warning: previous definition of LIBRE_OFFICE_BIN was here
/var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:33: warning: already initialized constant Mark::PANDOC_BIN
/var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:33: warning: previous definition of PANDOC_BIN was here
/var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:34: warning: already initialized constant Mark::PANDOC_FRM
/var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:34: warning: previous definition of PANDOC_FRM was here

May I ignore this or is something to do?

HugoHasenbein commented 2 years ago

Dear Johannes,

this is the first time I get feedback about this behavior. I assume, redmine is configured to eager load and then loads cliff libre and mark again. For now, you may ignore this. I'm investigating, what might be happening. If you could share your environment configuration in /config/environments, that would help me to improve the plugin. Just peruse the configuration files, that no passwords or the like are included.

Best regards

Stephan

Am 18.03.2022 um 13:32 schrieb Johannes Tassilo Gruber @.***>:

Previews are working well (PDF, DOCX, etc.) but I get some warnings while puma server ist starting.

/var/www/.../plugins/redmine_more_previews/converters/cliff/lib/cliff.rb:264: warning: already initialized constant Cliff::UNSAFETAGS /var/www/.../plugins/redmine_more_previews/converters/cliff/lib/cliff.rb:264: warning: previous definition of UNSAFETAGS was here /var/www/.../plugins/redmine_more_previews/converters/libre/lib/libre.rb:27: warning: already initialized constant Libre::LIBRE_OFFICE_BIN /var/www/.../plugins/redmine_more_previews/converters/libre/lib/libre.rb:27: warning: previous definition of LIBRE_OFFICE_BIN was here /var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:33: warning: already initialized constant Mark::PANDOC_BIN /var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:33: warning: previous definition of PANDOC_BIN was here /var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:34: warning: already initialized constant Mark::PANDOC_FRM /var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:34: warning: previous definition of PANDOC_FRM was here May I ignore this or is something to do?

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/45, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRFOW6RCK7GRS4WAMCLVARZU3ANCNFSM5RBWT7VQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.

HugoHasenbein commented 2 years ago

Dear Johannes,

I have done some rearrangement of code and files. Now loading the plugin should be 'idempotent', this not complaining about defining things twice.

The new plugin is beta, but behaves well on my machine after I have been able to reproduce your warnings.

Best regards

Stephan

Am 18.03.2022 um 13:32 schrieb Johannes Tassilo Gruber @.***>:

Previews are working well (PDF, DOCX, etc.) but I get some warnings while puma server ist starting.

/var/www/.../plugins/redmine_more_previews/converters/cliff/lib/cliff.rb:264: warning: already initialized constant Cliff::UNSAFETAGS /var/www/.../plugins/redmine_more_previews/converters/cliff/lib/cliff.rb:264: warning: previous definition of UNSAFETAGS was here /var/www/.../plugins/redmine_more_previews/converters/libre/lib/libre.rb:27: warning: already initialized constant Libre::LIBRE_OFFICE_BIN /var/www/.../plugins/redmine_more_previews/converters/libre/lib/libre.rb:27: warning: previous definition of LIBRE_OFFICE_BIN was here /var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:33: warning: already initialized constant Mark::PANDOC_BIN /var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:33: warning: previous definition of PANDOC_BIN was here /var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:34: warning: already initialized constant Mark::PANDOC_FRM /var/www/.../plugins/redmine_more_previews/converters/mark/lib/mark.rb:34: warning: previous definition of PANDOC_FRM was here May I ignore this or is something to do?

— Reply to this email directly, view it on GitHub https://github.com/HugoHasenbein/redmine_more_previews/issues/45, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJWRDRFOW6RCK7GRS4WAMCLVARZU3ANCNFSM5RBWT7VQ. Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you are subscribed to this thread.