74

I'm on Mountain Lion and installed ImageMagick using Homebrew (minimagick is also in my Gemfile but I don't think that's relevant). SimpleCaptcha uses it in a Rails app to create CAPTCHAs.

However, the image isn't created cause of this error:

Error while running convert: convert: unable to read font `/usr/local/share/ghostscript/fonts/n019003l.pfb' @ error/annotate.c/RenderFreetype/1123.
convert: Postscript delegate failed `/var/folders/gd/n7rzfhkd5jd0ws8jnzsz34hr0000gn/T/magick-vzHHz4ZP': No such file or directory @ error/ps.c/ReadPSImage/830.
convert: no images defined `/var/folders/gd/n7rzfhkd5jd0ws8jnzsz34hr0000gn/T/simple_captcha20121218-64930-1thtfpf.jpg' @ error/convert.c/ConvertImageCommand/3032.

Any ideas?

Agis
  • 32,639
  • 3
  • 73
  • 81

2 Answers2

160

Looks like you're missing ghostscript. If you are using Homebrew you can install it via:

$ brew install ghostscript
Glorfindel
  • 21,988
  • 13
  • 81
  • 109
cfeduke
  • 23,100
  • 10
  • 61
  • 65
0

if you are using Ubuntu or in a docker with Ubuntu remove and reinstall ghostscript package will fix your issue

apt remove ghostscript
apt install ghostscript

Anish Varghese
  • 3,450
  • 5
  • 15
  • 25