Seid Rudy wrote:

> I have a problem using "scp" from a ruby scrip. It copies my sql file to
> the destination but it cuts the file the middle of line 290.
> When i run scp manually i the copied file is normal.
> 
> I am using `` to call the unix command
> 
> Dir.chdir(sql_folder)
> `scp -r #{sql_folder} #{remotelogin}:#{remotesqlfolder}/#{document_id}`
> 
> Do you have any idea what i am doing wrong?

I want to emphasize this is just an off-the-wall guess. The `backticked
code` is being forked, the parent process terminates prematurely, and the
forked process is killed, also prematurely.

Have you tried "system" instead of back-ticks? "system" returns a process
completion code, therefore it must wait until the process completes.

-- 
Paul Lutus
http://www.arachnoid.com