Tahir Rauf
2009-Jun-11 06:56 UTC
[Mongrel] Mongrel crashes while running ''exec'' through ruby.
Hi All, I have a ruby on rails application and in the controller, I try to run a shell script using exec command like this --- variable = ''sh /home/abc.sh'' exec variable --- But when the control comes at this line, the mongrel server immediately crashes, and when I check its status its says "missing pid file". The shell script contains nothing wrong, it works fine on the linux console, I have also commented everything in that shell script and put just a single variable declaration, but even then the serer crashes.. Any Ideas, or is there any other way to run a shell script using ruby on rails ?? Thanks in advance.. Tahir Rauf -- Posted via http://www.ruby-forum.com/.
Tahir Rauf
2009-Jun-11 09:48 UTC
[Mongrel] Mongrel crashes while running ''exec'' through ruby.
Got the solution, exec starts a new process so don''t use it.. just use the shell command in ruby like this `sh /home/abc.sh` in the controller.. It runs fine -- Posted via http://www.ruby-forum.com/.