Project

General

Profile

Actions

Defect #37584

closed

Gantt PNG export fails (MiniMagick error)

Added by Oana VIGY about 4 years ago. Updated 14 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Resolution:
Duplicate
Affected version:

Description

Dear All,

I encounter a problem while exporting Gantt chart in PNG MiniMagick::Error (You must have ImageMagick or GraphicsMagick installed): as already reported in #35424.

I tried the fix proposed by Jan without success.

We just upgraded to Redmine 5.0.2 (from 4.2.2) with Ruby 3.0 (I don't remember if it worked earlier).

If someone have an idea. Thanks.

Best regards,

Oana


Production log:

I, [2022-08-17T16:10:49.664599 #93460]  INFO -- : [367292a9-e17e-4a86-a18d-13976de5d954] Started GET "/projects/qualite/issues/gantt.png?month=8&months=6&year=2022&zoom=2" for 10.7.19.28 at 2022-08-17 16:10:49 +0200
I, [2022-08-17T16:10:49.666126 #93460]  INFO -- : [367292a9-e17e-4a86-a18d-13976de5d954] Processing by GanttsController#show as PNG
I, [2022-08-17T16:10:49.666212 #93460]  INFO -- : [367292a9-e17e-4a86-a18d-13976de5d954]   Parameters: {"month"=>"8", "months"=>"6", "year"=>"2022", "zoom"=>"2", "project_id"=>"qualite"}
I, [2022-08-17T16:10:49.673618 #93460]  INFO -- : [367292a9-e17e-4a86-a18d-13976de5d954]   Current user: adminPPM (id=50)
I, [2022-08-17T16:10:49.734119 #93460]  INFO -- : [367292a9-e17e-4a86-a18d-13976de5d954] Completed 500 Internal Server Error in 68ms (ActiveRecord: 31.5ms | Allocations: 17710)
F, [2022-08-17T16:10:49.734835 #93460] FATAL -- : [367292a9-e17e-4a86-a18d-13976de5d954]
[367292a9-e17e-4a86-a18d-13976de5d954] MiniMagick::Error (You must have ImageMagick or GraphicsMagick installed):
[367292a9-e17e-4a86-a18d-13976de5d954]
[367292a9-e17e-4a86-a18d-13976de5d954] lib/redmine/helpers/gantt.rb:401:in `to_image'
[367292a9-e17e-4a86-a18d-13976de5d954] app/controllers/gantts_controller.rb:46:in `block (2 levels) in show'
[367292a9-e17e-4a86-a18d-13976de5d954] app/controllers/gantts_controller.rb:42:in `show'
[367292a9-e17e-4a86-a18d-13976de5d954] lib/redmine/sudo_mode.rb:61:in `sudo_mode'

Redmine information

Environment:
  Redmine version                5.0.2.stable
  Ruby version                   3.0.4-p208 (2022-04-12) [amd64-freebsd13]
  Rails version                  6.1.6
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
Redmine settings:
  Redmine theme                  Default
SCM:
  Git                            2.37.1
  Filesystem                     
Redmine plugins:
  no plugin installed
MiniMagick and ImageMagick
  • MiniMagick available : mini_magick (4.11.0)
  • ImageMagick
    • Version7.1.0-34 Q16-HDRI
    • Path defined in "configuration.yml": imagemagick_convert_command: /usr/local/bin/convert

Related issues

Is duplicate of Redmine - Defect #35424: https://www.redmine.org/boards/2/topics/65661ClosedMarius BĂLTEANUActions
Actions #1

Updated by Jan Catrysse about 3 years ago

I also migrated to 5.x and I no longer have that specific issue, so it should be resolved.

Actions #2

Updated by Go MAEDA 14 days ago

  • Is duplicate of Defect #35424: https://www.redmine.org/boards/2/topics/65661 added
Actions #3

Updated by Go MAEDA 14 days ago

  • Status changed from New to Closed
  • Resolution set to Duplicate

This was fixed in Redmine 6.0.0 by r23099 (#41312), which upgraded MiniMagick to 5.0.

MiniMagick 4.x looked for "magick", "mogrify", or "gm" in PATH and raised "You must have ImageMagick or GraphicsMagick installed" when none was found. Since this detection only searched PATH, the "imagemagick_convert_command" setting had no effect.

MiniMagick 5 removed this detection and simply runs "magick" (or "convert") directly, so the error no longer occurs.

Note that MiniMagick 5 also removed cli_path, so "imagemagick_convert_command" is now ignored (see #42145, r23597). If ImageMagick is not in Redmine's PATH, you need to add it to PATH.

Actions

Also available in: Atom PDF