Forum: Ruby on Rails Run external ruby script from contoller

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Cf8a610127d1108dfe67f673320b5fe5?d=identicon&s=25 Craig Jolicoeur (craigpj)
on 2006-12-29 20:09
I have an already existing ruby script that will interface with the
del.icio.us api.  I'm putting together a rails app and would like to use
this already existing ruby script for several reasons.

My question is how to call this ruby script from within my controller?

I simply want to call the script, pass it a few parameters and then
proceed onto my next statement, so the script executes as its own
process and the controller action continues executing whether or not the
script execution was successful.

anyone done this before?
Cf8a610127d1108dfe67f673320b5fe5?d=identicon&s=25 Craig Jolicoeur (craigpj)
on 2006-12-29 20:27
Let me somewhat rephrase the question (although I still would like to
know the answer to my original question).

The more I think about it the more I want to keep the processing in a
rails controller simply for the fact that I have all the database and
model info existing.

So, how would I pass processing within a controller action to another
controller action without waiting for the second action to finish.

i.e.

def process_request
  go_perform_other_process  #(process but don't wait for completion
before continuing)
  do rest of action routine
end
Ffb15a8418eb7f49060b6764aba1dc52?d=identicon&s=25 Rm Rm (rmehta)
on 2007-02-19 06:14
Hi,

How did you do it finally ?


Craig Jolicoeur wrote:
> Let me somewhat rephrase the question (although I still would like to
> know the answer to my original question).
>
> The more I think about it the more I want to keep the processing in a
> rails controller simply for the fact that I have all the database and
> model info existing.
>
> So, how would I pass processing within a controller action to another
> controller action without waiting for the second action to finish.
>
> i.e.
>
> def process_request
>   go_perform_other_process  #(process but don't wait for completion
> before continuing)
>   do rest of action routine
> end
Bb1d12e2970416cab10fe3af70a7f99f?d=identicon&s=25 Prabhakar Chaganti (Guest)
on 2007-02-19 06:18
(Received via mailing list)
Check out BackgrounDRb -- http://backgroundrb.rubyforge.org/.
This topic is locked and can not be replied to.