diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2025-04-06 10:09:53 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2025-04-06 10:09:53 +0000 |
commit | 397259fe5378cfe540b985be8d675d78b82f03c1 (patch) | |
tree | 581906cb635692803987b359ba8c5d10341593db | |
parent | 34171d87a0b35d1666548b1cf0aa7863d69c7701 (diff) | |
download | redmine-397259fe5378cfe540b985be8d675d78b82f03c1.tar.gz redmine-397259fe5378cfe540b985be8d675d78b82f03c1.zip |
Merged r23597 and r23598 from trunk to 5.1-stable (#42145).
git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@23600 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | lib/redmine/helpers/gantt.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb index b31486d5d..665930bf1 100644 --- a/lib/redmine/helpers/gantt.rb +++ b/lib/redmine/helpers/gantt.rb @@ -396,7 +396,15 @@ module Redmine Redmine::Configuration['rmagick_font_path'].presence img = MiniMagick::Image.create(".#{format}", false) if Redmine::Configuration['imagemagick_convert_command'].present? - MiniMagick.cli_path = File.dirname(Redmine::Configuration['imagemagick_convert_command']) + if MiniMagick.respond_to?(:cli_path) + MiniMagick.cli_path = File.dirname(Redmine::Configuration['imagemagick_convert_command']) + else + Rails.logger.warn( + 'imagemagick_convert_command option is ignored ' \ + 'because MiniMagick has removed the option to define a custom path for the binary. ' \ + 'Please ensure the convert binary is available in your PATH.' + ) + end end MiniMagick::Tool::Convert.new do |gc| gc.size('%dx%d' % [subject_width + g_width + 1, height]) |