# RMagick loading EPS files, trouble with Ghostscript?

**URL:** <https://www.ruby-forum.com/t/rmagick-loading-eps-files-trouble-with-ghostscript/115101>\
**Category:** Rails\
**Created:** [September 20, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/rmagick-loading-eps-files-trouble-with-ghostscript/115101 "2007-09-20T16:29:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![reynar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/e99b99/32.png) [@reynar](https://www.ruby-forum.com/u/reynar)\
**Post date:** [September 20, 2007, 4:29pm UTC](https://www.ruby-forum.com/t/rmagick-loading-eps-files-trouble-with-ghostscript/115101/1 "2007-09-20T16:29:39Z")

</div>

Hi,

I have GraphicsMagick and RMagick installed on OS X along with  
ghostscript to act as the postscript delegate for GM. All latest  
versions.

If I run…

im = Magick::Image::read("/testbarcode.eps").first

within script/console it returns fine. However the same line in my  
rails controller only seems to work very intermittently. Usually in  
small consecutive runs but then broken for the next however many  
requests until it decides it wants to work again.

When it fails, the output in the browser advise “Postscript delegate  
failed” and Mongrel running the app in development mode outputs the  
following to the console.

/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.4.0/lib/  
transaction/simple.rb:46: warning: already initialized constant  
Messages  
/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.4.0/lib/  
transaction/simple.rb:53: warning: already initialized constant  
TRANSACTION\_SIMPLE\_VERSION  
/usr/local/lib/ruby/gems/1.8/gems/transaction-simple-1.4.0/lib/  
transaction/simple.rb:436: warning: already initialized constant  
SKIP\_TRANSACTION\_VARS

Magick: “gs” -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnmraw  
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -g147x100 -r72x72 -  
sOutputFile=/var/tmp/gmmrDOYU – “/var/tmp/gmspCKzg” -c quit  
(terminated due to signal 26).

Magick: “gs” -q -dBATCH -dMaxBitmap=50000000 -dNOPAUSE -sDEVICE=pnmraw  
-dTextAlphaBits=4 -dGraphicsAlphaBits=4 -g147x100 -r72x72 -  
sOutputFile=/var/tmp/gmmrDOYU – “/var/tmp/gmspCKzg” -c quit  
(terminated due to signal 26).

It seems as if something is being locked or some resource is tied up  
and it only starts working again when something times out. It is also  
strange that outside of the ActionController it seems to work as  
expected. Closing and restarting Mongrel seems to have little effect.

Does anyone have any ideas why this might be happening?

Thanks, Andrew.
