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,