Topic: Running arbitrary scripts


I am developing a rails application and I have certain scripts that I need to have run that have nothing to do with rails and that don't need to provide any feedback. Basically, I have these 'mechanize' scripts that will go out and perform some actions but they have nothing to do with the rails application. Right now, the user has to wait for the mechanize scripts to finish because I just call them as a method within my controller.

I don't want to do this anymore. What is the easiest way to just start a standalone ruby script from my rails application. Keep in mind I don't need any progress reports and I don't need to know when it finishes. I just need to start the script and that's it and let it run on its own seperate from rails.

How can I achieve this? I do need to pass 2 parameters (string values) to the script.

It would be nice if this could work for windows and unix even if it requires two seperate solutions.

Last edited by xgamerx (2007-11-22 07:50:56)

Re: Running arbitrary scripts

Have a look at Backgroundrb (
and AP4R (

- rubyphunk