Skip to content

Instantly share code, notes, and snippets.

@jehoshua02
Created December 6, 2011 00:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jehoshua02/1436020 to your computer and use it in GitHub Desktop.
Save jehoshua02/1436020 to your computer and use it in GitHub Desktop.
Redmine Gantt PNG error...

Redmine Gantt PNG Error

When I go to https://mydomain.com/projects/myproject/issues/gantt.png?month=12&months=2&year=2011&zoom=2, I get see the following:

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

Back

Here's the applicable log entries in log/production.log:

Processing GanttsController#show (for 50.43.30.232 at 2011-12-04 12:18:06) [GET]
  Parameters: {"project_id"=>"picklesandcheese", "action"=>"show", "controller"=>"gantts"}
Rendering template within layouts/base
Rendering gantts/show
Completed in 581ms (View: 497, DB: 42) | 200 OK [http://flexcis.com/projects/picklesandcheese/issues/gantt]


Processing GanttsController#show to png (for 50.43.30.232 at 2011-12-04 12:18:13) [GET]
  Parameters: {"format"=>"png", "month"=>"12", "project_id"=>"picklesandcheese", "action"=>"show", "year"=>"2011", "controller"=>"gantts", "months"=>"2", "zoom"=>"2"}

Magick::ImageMagickError (unable to read font `/opt/redmine/common/share/ghostscript/fonts/n019003l.pfb' @ annotate.c/RenderFreetype/1043: `(null)'):
  lib/redmine/helpers/gantt.rb:504:in `draw'
  lib/redmine/helpers/gantt.rb:504:in `to_image'
  app/controllers/gantts_controller.rb:44:in `show'
  app/controllers/gantts_controller.rb:42:in `show'
  config/initializers/mongrel_cluster_with_rails_211_fix.rb:62:in `dispatch_cgi'

Rendering /opt/redmine/apps/redmine/public/500.html (500 Internal Server Error)

Reading here: http://rmagick.rubyforge.org/install-faq.html#fonts

Investigating how the fonts are configured:

bash-4.1$ convert -list font | grep type-ghostscript
Path: /opt/redmine/common/lib/ImageMagick-6.5.8/config/type-ghostscript.xml
bash-4.1$ less /opt/redmine/common/lib/ImageMagick-6.5.8/config/type-ghostscript.xml | grep "/opt/redmine/common/share/ghostscript/fonts/n019003l.pfb"
  <type name="fixed" fullname="Helvetica Regular" family="Helvetica" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="/opt/redmine/common/share/ghostscript/fonts/n019003l.afm" glyphs="/opt/redmine/common/share/ghostscript/fonts/n019003l.pfb"/>
  <type name="Helvetica" fullname="Helvetica Regular" family="Helvetica" foundry="URW" weight="400" style="normal" stretch="normal" format="type1" metrics="/opt/redmine/common/share/ghostscript/fonts/n019003l.afm" glyphs="/opt/redmine/common/share/ghostscript/fonts/n019003l.pfb"/>

Is it strange that there are two entries in the configuration for the same font? I don't know . . .

bash-4.1$ pwd
/opt/redmine/common/share/ghostscript/fonts
bash-4.1$ ls -l | grep n019003l
-rw-r--r-- 1 redmine redmine  42882 2011-09-18 09:11 n019003l.afm
-rw-r--r-- 1 redmine redmine  68587 2011-09-18 09:11 n019003l.pfb
-rw-r--r-- 1 redmine redmine   2920 2011-09-18 09:11 n019003l.pfm

Is it strange that there are three files here? I don't know . . .

bash-4.1$ convert label:abcdef test.gif
Error: /undefined in /findfont
Operand stack:
   Times-Roman-ISO   Times-Roman-ISO   Times-Roman
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1797   1   3   %oparray_pop   1796   1   3   %oparray_pop   1792   1   3   %oparray_pop   1675   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   1767   3   3   %oparray_pop
Dictionary stack:
   --dict:1088/1123(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--
Current allocation mode is local
Current file position is 263
GPL Ghostscript 8.56: Unrecoverable error, exit code 1
Error: /undefined in /findfont
Operand stack:
   Times-Roman-ISO   Times-Roman-ISO   Times-Roman
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1797   1   3   %oparray_pop   1796   1   3   %oparray_pop   1792   1   3   %oparray_pop   1675   1   3   %oparray_pop   --nostringval--   %errorexec_pop   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   1767   3   3   %oparray_pop
Dictionary stack:
   --dict:1088/1123(ro)(G)--   --dict:0/20(G)--   --dict:71/200(L)--
Current allocation mode is local
Current file position is 263
GPL Ghostscript 8.56: Unrecoverable error, exit code 1
.convert.bin: unable to read font `/opt/redmine/common/share/ghostscript/fonts/n019003l.pfb' @ annotate.c/RenderFreetype/1043.
.convert.bin: Postscript delegate failed `/tmp/magick-XXy6qHNl': /tmp/magick-XXmsHJ0r.cache @ ps.c/ReadPSImage/765.
.convert.bin: missing an image filename `test.gif' @ convert.c/ConvertImageCommand/2838.

Not sure what to make of all this, but "convert: FreeType library is not available 'abcdef'." is not in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment