Forum: Ruby on Rails Fork process from controller fails...

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.
3bc1d12e659d571683c0820db7e09e88?d=identicon&s=25 Christian Schlaefcke (cschlaefcke)
on 2007-04-05 11:16
Hi Folks,

in my controller I need to start a process that controls a task that
could take quite a long time (duration: from seconds up to several
hours). Because the task is monolithic (execution of a sybase stored
procedure) I cannot use threads because they block all other threads
until the current thread has finishd. I also tried daemons and
backgroundrb, which both didn´t work for me. Because I definitely need
my tasks get executed in a concurrent way I decided to give Processes a
chance. I know they are tricky and hard to handle, but unless ruby
threads don´t become more useful in the future I have no choice.


I played around with processes in a little test script. That worked
fine. But now I need to get it integrated in my Rails controller and I
get this annoying error:
ruby: No such file or directory -- [path_to_project]/ExecutionWrapper/-e

No exception, no stack trace. It looks like the process does not get
forked at all. I also tried reducing complexity by only having a simple
print in my process.fork body ... still no luck! So what´s the problem?

I appreciate any help! Even hints on how I can solve my problem with a
complete new approach.

Thanks & Regards,

This topic is locked and can not be replied to.