I am using jruby on rails for rails 2.3.8. And I wanted to process the
images uploaded, for the image_voodoo and rmagick4j are both not good
enough
for our requirement. What we did is calling an external ruby script and
use
rmagick in that ruby script to handling the image processing work.
I add the code like the following:
system(“ruby ${path}/image_processing.rb filename.jpg”)
It works fine if I put image_processing.rb in the path like
/Users/stanley
on a MacOSX
But it will fail if I put the image_processing.rb inside the application
path, like /Users/stanley/Documents/codebase/imoso_code/lianyijia/script
(lianyijia is the rails app path)
The message told me it could not find the gem rmagick in jruby gem path.
Could anyone told me why or give a possible solution? For I wanted to
put
the script inside the rails app path and then I could deploy the code
simply
without define an absolute path and copy the script every time.
On Sun, Oct 17, 2010 at 5:43 AM, Stanley Xu [email protected] wrote:
path, like/Users/stanley/Documents/codebase/imoso_code/lianyijia/script
(lianyijia is the rails app path)
The message told me it could not find the gem rmagick in jruby gem path.
Could anyone told me why or give a possible solution? For I wanted to put
the script inside the rails app path and then I could deploy the code simply
without define an absolute path and copy the script every time.
You might be running afoul of JRuby’s built-in magic that tries to
spawn ruby scripts in process. To see if that’s the case, try changing
the system command to something like: