修复了不可读的ghostscript字体

时间:2011-09-21 17:07:11

标签: ruby ghostscript

我正在使用ruby Scruffy gem创建一些图表。它依赖于RMagick来渲染文本并创建png。当我运行我的ruby脚本时,我收到了这个错误。

sh: gs: command not found
sh: gs: command not found
/Users/natebird/.rvm/gems/ree-1.8.7-2011.03/gems/scruffy-0.2.6/lib/scruffy/rasterizers/rmagick_rasterizer.rb:15:in `from_blob': unable to read font `/usr/local/share/ghostscript/fonts/n019003l.pfb' @ error/annotate.c/RenderFreetype/1128: `(null)' (Magick::ImageMagickError)
    from /Users/natebird/.rvm/gems/ree-1.8.7-2011.03/gems/scruffy-0.2.6/lib/scruffy/rasterizers/rmagick_rasterizer.rb:15:in `rasterize'
    from /Users/natebird/.rvm/gems/ree-1.8.7-2011.03/gems/scruffy-0.2.6/lib/scruffy/graph.rb:164:in `render'
    from autobench_grapher.rb:61:in `generate_graph'
    from autobench_grapher.rb:30:in `run'
    from autobench_grapher.rb:15:in `run'
    from autobench_grapher.rb:91

1 个答案:

答案 0 :(得分:22)

您需要安装ghostscript(请参阅:gs: command not found)。如何执行此操作取决于您所使用的平台。