Project

General

Profile

Problem with rmagick/imagemagick after upgrading to Redmine 2.5.0

Added by Ivan Cenov over 10 years ago

After upgrading to Redmine 2.5.0 I encountered a problem: Issues that have graphics in them raise internal error.

  Rendered issues/_action_menu.html.erb (2625.0ms)
  Rendered plugins/redmine_code_review/app/views/code_review/_issues_show_details_bottom.html.erb (46.9ms)
  Rendered plugins/redmine_apijs/app/views/attachments/_links.html.erb (46.9ms)
  Rendered issues/show.html.erb within layouts/base (3625.0ms)
Completed 500 Internal Server Error in 5171.9ms

ActionView::Template::Error (uninitialized constant ActionView::CompiledTemplates::Magick):
    9:                 <a href="<%= url_for({:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename}) %>" type="<%= attachment.content_type %>" onclick="return false;" class="icon icon-file video" id="diaporama.<%= @slideshowI %>.<%= slideshowJ %>"><input type="hidden" value="false|<%= format_time(attachment.created_on) %>|<%= attachment.description.gsub(/['"\\\x0]/,'\\\\\0') %>" /><%= h(attachment.filename) %></a>
    10:                 <% slideshowJ += 1 %>
    11:             <% elsif attachment.image? && attachment.readable? %>
    12:                 <% img = Magick::Image::read(attachment.diskfile).first %>
    13:                 <a href="<%= url_for({:controller => 'attachments', :action => 'show', :id => attachment, :filename => attachment.filename}) %>" type="<%= attachment.content_type %>" onclick="return false;" class="icon icon-file image-gif" id="diaporama.<%= @slideshowI %>.<%= slideshowJ %>"><input type="hidden" value="<%= img.columns %>|<%= img.rows %>|false|<%= format_time(attachment.created_on) %>|<%= attachment.description.gsub(/['"\\\x0]/,'\\\\\0') %>" /><%= h(attachment.filename) %></a>
    14:                 <% slideshowJ += 1 %>
    15:             <% else %>
  app/helpers/attachments_helper.rb:31:in `link_to_attachments'
  app/views/issues/show.html.erb:85:in `_app_views_issues_show_html_erb__1051772100_37536132'
  app/controllers/issues_controller.rb:128:in `block (2 levels) in show'
  app/controllers/issues_controller.rb:125:in `show'

Redmine somehow does not recognise rmagick gem. However, rmagick 2.13.1 and 2.13.2 are installed in the system. Also ImageMagick 6.8.0-Q16 is installed and this has worked with Redmine 2.4.2 and before for long time. Things are even more strange because Redmine trunk, that at this moment is identical with Redmine 2.5.0 works happily with rmagick and ImageMagick 6.8.0-Q16 on my laptop with test installation.

Does anyone experienced such problem?


Replies (2)

RE: Problem with rmagick/imagemagick after upgrading to Redmine 2.5.0 - Added by Ivan Cenov over 10 years ago

Well, let change the question: How Redmine determines that Rmagick is not available (see the picture above) ?
Rmagick is successfully loaded in irb interpreter by require 'rmagick' -- it returns true. Why Redmine does not see Rmagick?

RE: Problem with rmagick/imagemagick after upgrading to Redmine 2.5.0 - Added by Ivan Cenov over 10 years ago

It was simple:

In file .bundle/config was

BUNDLE_WITHOUT: test:development:rmagick

Removed rmagick and it worked.

    (1-2/2)