# Fork process from controller fails

**URL:** <https://www.ruby-forum.com/t/fork-process-from-controller-fails/91175>\
**Category:** Rails\
**Created:** [April 5, 2007, 11:16am UTC](https://www.ruby-forum.com/t/fork-process-from-controller-fails/91175 "2007-04-05T11:16:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![caefer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e36b37/32.png) [@caefer](https://www.ruby-forum.com/u/caefer)\
**Post date:** [April 5, 2007, 11:16am UTC](https://www.ruby-forum.com/t/fork-process-from-controller-fails/91175/1 "2007-04-05T11:16:13Z")

</div>

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.

Anyway…

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  
(LoadError)

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,

Christian
