John,

The key is I don't want to wait for the remote to finish. If I wait for 
remote to complete, I don't have problem.

Thanks.

Enling


John W Higgins wrote:
> Are you sure you are properly connecting to the server? Have you tried 
> just
> running something like ls and getting back a result? I just tried 
> running a
> simple script that sleeps for 100 seconds and it ran just fine after the
> remote app was finished.
> 
> If that still leaves you in trouble - you might want to look into Screen
> which is designed to run apps detached from the login shell so that 
> would
> certainly be of use if needed. This is the command I use to run an app
> detached - screen -D -m command.rb
> 
> John

-- 
Posted via http://www.ruby-forum.com/.