Execute the ruby script remotely in windows

Hi All,

I’ve two windows system say System1 and System2 and both having ruby

I am at System1 and I need to run a ruby script ( say sample.rb) in the

Please let me know how would i do that. ( step wise or the exact code as

There is no Rails installed etc.


On 10/27/2010 9:41 AM, Arihan S. wrote:

There is no Rails installed etc.

There are a number of ways to go about this, but I think you would
likely get better information if you ask a slightly more generalized
form of this question to a Windows support forum. What you want to ask
is, “How do I use one Windows system to run a program on another Windows

Personally, I just install openssh under Cygwin so that I can run
programs remotely on my Windows systems the same way I do for my Unix
systems; however, this may not be the best way for you depending on your
circumstances. It’s not exactly trivial to set up, but if you want to
also run programs remotely on non-Windows systems, you should probably
consider it for the sake of consistency.

Another option may be to use PsExec:

I hear this works fairly well, but I don’t know anything about how
secure or robust it is. It’s supposed to be pretty trivial though.

Using either of the above methods, you need to make sure that your
script is available to the remote system either from a file share or
somewhere on the remote system itself. You should then be able to
invoke Ruby to run that script.