Welcome Guest | Login

mongrels, fcgi, ImageScience and Rmagick

So I have my rails app running in two separate places:

1) Staging
Staging is be handled by fcgi

2) Production
Production has a 3 mongrel cluster

Staging is setup for showing my client changes prior to deploying them to the live production version. In the staging environment I have images being uploaded and processed by attachment_fu with Rmagick because I can't get ImageScience to work with fcgi.

If I have Rmagick as the image processor, then I get  "SystemExit" errors in any page that tries to call images (locations) handled by attachment_fu.

Conversely, Production and the mongrels only work with ImageScience. If I leave the setting to Rmagick, uploads happen but no resizing, etc.

What's going on here? Any ideas? I prefer to use ImageScience on both and really would like to cut down the number of svn commits I'm making just to toggle the settings in the attachment_fu related models.

2008-03-06 12:33 AM

You may refer our forum link below.
--------
http://www.hostingrails.com/forums/deployment_troubleshooting_thread/384

2008-03-06 01:30 AM

So I checked out the thread. The last post reads:

"We've noticed that Attachment_fu plus image_science do not work properly with FastCGI and Apache. So I would recommend using Rmagick."

Is the simple answer to my question that ImageScience paired with fcgi will not work and Rmagick paired with mongrel will not work?

2008-03-06 07:42 AM

Phattymatt - Extensive usage of Rmagick for uploading and resizing images could cause mongrels to crash as we've seen this happening with various customer apps. If this is not the case with your app, it should work fine. In regards to the original problem, have you tried freezing Rails into your app ? - this would solve atleast a part of this issue.

You may also try explicitly specifying the processor  attachment_fu should use  (RMagick, ImageScience, or MiniMagick)

has_attachment :content_type => :image,
:processor=> :rmagick

This may go into one of your models.

2008-03-06 09:38 AM

I do have the specific processor specified in my models. That's the headache of it. I have to change the processor settings depending on which version of my app I'm running, eg, Staging(fcgi) or Production(mongrel cluster).


So, basically I:
1) Set all image processors to Rmagick
2) Commit changes
3) Deploy to Staging
4) Get client approval
5) Change images processors back to ImageScience
6) Commit changes
7) Deploy to Production

I really shouldn't have to do step 5 & 6. I do NOT want to use Rmagick but I HAVE to for the Staging version running on fcgi to work.

Does ImageScience work with fcgi? Am I just out of luck?


2008-03-06 11:05 AM

You're out of luck, we've never seen (or been able to get) ImageScience working with FastCGI before.  If you manage to do so let us know.

2008-03-06 01:04 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.