I recently adapted the application for my rails to work in JRuby. One of the issues I ran into was with Paperclip. Paperclip uses Cocaine to run command line tools such as ImageMagick, and uses Process.spawn, which results in:
Errno :: ECHILD: No child processes - No child processes
waitpid at org / jruby / RubyProcess.java: 512
waitpid at org / jruby / RubyProcess.java: 497
waitpid at /home/cthulhu/.rvm/gems/jruby-1.6.7.2/gems/cocaine-0.3.0/lib/cocaine/command_line/runners/process_runner.rb:21
call at /home/cthulhu/.rvm/gems/jruby-1.6.7.2/gems/cocaine-0.3.0/lib/cocaine/command_line/runners/process_runner.rb:9
execute at /home/cthulhu/.rvm/gems/jruby-1.6.7.2/gems/cocaine-0.3.0/lib/cocaine/command_line.rb:77
run at /home/cthulhu/.rvm/gems/jruby-1.6.7.2/gems/cocaine-0.3.0/lib/cocaine/command_line.rb:55
run at /home/cthulhu/.rvm/gems/jruby-1.6.7.2/gems/paperclip-3.2.0/lib/paperclip/helpers.rb:29
Is there any way to make paperclip work smoothly with JRuby? I run my application only on Linux, so I do not mind using my own linux tools like ImageMagick.
Rails 3.2.8, JRuby 1.6.7.2
source
share