summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2025-04-06 10:08:45 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2025-04-06 10:08:45 +0000
commit84affd173b4426819a0b3923f5c6a2540c39c7c7 (patch)
treebd3cdedfa161f0c0d2f6d4ebe39fcdd547814d8e
parent1a28fcdb4b4296152e92428f8c64a85b469b68cf (diff)
downloadredmine-84affd173b4426819a0b3923f5c6a2540c39c7c7.tar.gz
redmine-84affd173b4426819a0b3923f5c6a2540c39c7c7.zip
Merged r23597 and r23598 from trunk to 6.0-stable (#42145).
git-svn-id: https://svn.redmine.org/redmine/branches/6.0-stable@23599 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/helpers/gantt.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 43e0986c6..bd784609b 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}")
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.convert do |gc|
gc.size('%dx%d' % [subject_width + g_width + 1, height])