Your error is the use of exec() - exec() overwrites the whole process
(all threads) with the new program. Use the system() instead...
izidor
On 21.5.2008, at 11:52, arunmehta wrote:
>
> I have an application in which a server part has been written using
> rails, and the client part using firewatir. I would like to fire both
> up with a single command. What mistake am I making below? I am
> running this from the app root folder, where I am able to fire up irb
> and successfully feed it exec(''script/server'').
>
> Warmly, Arun
>
> #!/usr/bin/env ruby
> require ''rubygems''
> #Include the FireWatir file.
> require ''firewatir''
> #include the FireWatir Module.
> include FireWatir
> begin
> th=Thread.new{exec(''script/server'')}
> sleep(3) #to give the server time to start. Is there a better way?
> ff=Firefox.new
> ff.goto("http://localhost:3000")
> sleep (5)
> ensure
> ff.close
> th.terminate
> end
> ____
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---