ruby – 修复不可读的ghostscript字体

前端之家收集整理的这篇文章主要介绍了ruby – 修复不可读的ghostscript字体前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我使用 ruby Scruffy宝石来创建一些图形.它依赖于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

解决方法

您需要安装ghostscript(请参阅:gs:command not found).你这样做取决于你所在的平台.
原文链接:https://www.f2er.com/ruby/265794.html

猜你在找的Ruby相关文章