Defect #36231

Added by Jan Catrysse about 1 month ago. Updated 24 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Resolution: Affected version:4.2.3


I get an error about a missing ImageMagick installation when exporting a Redmine Gantt chart to PNG. But I cannot pin down the reason because everything seems to be installed correctly, and I have an identical server with the same OS, same Redmine version / config and the same packages etc. installed. On the other (test) server, it all seems to work.

What could be the issue, or how can I pin it down?

Some more in depth information:

Error in the logs:

    Started GET "/projects/migratie/issues/gantt.png

    MiniMagick::Error (You must have ImageMagick or GraphicsMagick installed):

    lib/redmine/helpers/gantt.rb:399:in `to_image'
    app/controllers/gantts_controller.rb:46:in `block (2 levels) in show'
    app/controllers/gantts_controller.rb:42:in `show'
    lib/redmine/sudo_mode.rb:61:in `sudo_mode'

Redmine information:

    Redmine 4.2.3.stable
    Standaard beheerderaccount gewijzigd     
    Bestandsrepository schrijfbaar     
    Plugin assets map schrijfbaar (./public/plugin_assets)     
    MiniMagick beschikbaar (optioneel)     
    ImageMagick comversie beschikbaar (optioneel)     
    ImageMagick PDF support available (optional)     

      Redmine version                4.2.3.stable
      Ruby version                   2.7.4-p191 (2021-07-07) [amd64-freebsd13]
      Rails version                  5.2.6
      Environment                    production
      Database adapter               Mysql2
      Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
      Mailer delivery                sendmail
      Git                            2.33.1
    Redmine plugins:
      easy_gantt                     1.13
      redmine_agile                  1.6.2
      redmine_checklists             3.1.20
      redmine_contacts               4.3.4
      redmine_contacts_helpdesk      4.1.12
      redmine_contacts_invoices      4.2.5
      redmine_crm_mailchimp          1.0.4
      redmine_datetime_custom_field  1.0.4
      redmine_drive                  1.1.1
      redmine_editauthor             0.11.0
      redmine_favorite_projects      2.1.1
      redmine_finance                2.1.7
      redmine_issue_templates        1.1.0
      redmine_people                 1.6.1
      redmine_products               2.1.4
      redmine_questions              1.0.2
      redmine_reporter               2.0.0
      redmine_resources              1.0.6
      redmine_tint_issues            1.2.1
      redmine_view_issue_description 0.0.2
      redmine_zenedit                2.0.1
      redmineup_tags                 2.0.11
      stopwatch                      0.2.0

Verified steps: please bear in mind that it works on the test server.

1. Same FreeBSD version 13.0-release
2. Same Redmine 4.2.3 version, configuration and plugins (I did a directory compare)
3. ImageMagick7 installed, tested (convert and magick command) and executes as www user, available in the path env. Same options and confirmed PNG support.
4. Gem mini_magick (4.11.0, 4.10.1) installed.
5. Bundle: Using mini_magick 4.11.0 in /usr/local/www/redmine
6. configuration.yml (with two leading spaces): imagemagick_convert_command: /usr/local/bin/convert
7. Other converts (eg. pdf) in Redmine seem to work fine on both servers.
8. Moving to another database does not change a thing.
9. Apache config is identical.


#1 Updated by Jan Catrysse about 1 month ago

Sorry for the wrong title, I cannot change it back anymore.

#2 Updated by Go MAEDA about 1 month ago

Does applying the patch in #35027#note-1 resolve the issue?

#3 Updated by Jan Catrysse 24 days ago

Go MAEDA wrote:

Does applying the patch in #35027#note-1 resolve the issue?

No, this did not make a difference. I cannot point my finger on the reason... on another server with, as far as I can see, an identical configuration it works fine.

Could someone tell me how I can activate logging on production to have some more detailed information when I get the error?

#4 Updated by Jan Catrysse 24 days ago

I added this line to the patched area in gantt.rb

if Redmine::Configuration['imagemagick_convert_command'].present?
    MiniMagick.cli_path = File.dirname(Redmine::Configuration['imagemagick_convert_command'])
    MiniMagick.logger.level = Logger::DEBUG

In development and test, this outputs a nice convert command line in my httpd_error_log ... on production nothing.

I first tried with a deprecated MiniMagick.debug = true, and this is outputting a deprecated warning, also on production. So, this means Redmine::Configuration['imagemagick_convert_command'].present is true.

So, the issue must really be related to MiniMagick ... or me having done something stupid.

I double-checked Redmine::Configuration['imagemagick_convert_command'] with some logging... and it seems to be correct.

Also available in: Atom PDF