to open Remotely

I know that this question looks like a Webistrano question but since I
don’t know much about Ruby, I thought it might be a simple Ruby question
We have installed Webistrano and Capistrano install on some server
(let’s say Server1). I have created a Webistrano project and inside it I
have defined my Host to be ‘Server2’. I have this Ruby code inside my
require ‘open-uri’
writeout = open("/home/test/test.txt", “wb”)

The problem is Webistrano is giving me an error saying that
/home/test/test.txt does not exist. I believe what It’s trying to do is
to create test.txt in Server1 (Capistrano Server) instead of my defined
Is there any way in Ruby to say Open the file remotely (e.g.
“Server2:/home/test/test.txt”) (assuming there is no Server of any kind
installed on Server2).
Strange is if I have a command like run “bash --login -c ‘touch
test.txt’”, it will create test.txt in the right defined Host (Server2).
But ‘open’ somehow is failing.

Thanks in Advance,