Forum: Ruby on Rails Using system() to execute a script outside of Rails but in a

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
1c0cd550766a3ee3e4a9c495926e4603?d=identicon&s=25 (Guest)
on 2007-07-26 01:34
(Received via mailing list)
I'm trying to hack around a previously mentioned RMagick problem,
confirmed to exist inside of Rails but not outside.
Thus, I'd like to call a Ruby script from with in a Rails controller.
Like so:

But it never seems to get executed.
Permissions are set to 755 on the script.
Any suggestion?
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2007-07-26 02:39
(Received via mailing list)
If you're just trying to do thumbnails, better to look at how
file_column or a similar plugin accomplish that than to shell out to
a different process. Rails is a one-in-one-out pipe, so blocking
requests on a shell process could really screw up your performance.
1c0cd550766a3ee3e4a9c495926e4603?d=identicon&s=25 (Guest)
on 2007-07-26 04:04
(Received via mailing list)
I know Rails is a single threaded process, because Ruby is as well.
But at this point even the maintainer of RMagick (who I've been
talking to a lot the last few days) is mystified by how my thumbs can
be correct when run from a straight Ruby script on the same system,
but through Rails it gets screwed up.
Ef0db53920b243d6758c2f6b1306df0d?d=identicon&s=25 Steve Ross (cwd)
on 2007-07-26 06:14
(Received via mailing list)
Well, I dunno, but I used file_column on one of my sites that's been
happily purring away and the relevant code is:

img = ::Magick::Image::read(absolute_path).first
resize_image(img, version_options[:geometry], absolute_path(name))

Where version_options[:geometry] is, as you might expect, the
geometry to resize to a thumbnail. Are you doing something different?
This topic is locked and can not be replied to.