From: Brian Candler Date: 2010-10-21T04:12:47+09:00 Subject: Re: execute the ruby script remotely Arihan Sinha wrote in post #955864: > ruby is installed in system1, and system2. > > I am at system1. > > I want to connect to system2, then invoke ruby and execute a ruby > script. > > say I've a sample script in system2 as sample.rb. > > I want to run that from system1. > > Please let me know how I would do that. Look into ssh. You can run the ssh client directly it using system [vlad does this], or you can use the Net::SSH gem [capistrano does this] Of course, you need a working ssh daemon on system2. With Unix/Linux you'll have this out of the box. For Windows look at installing cygwin. ssh is well tested and secure. Less secure alternative: write your script sample.rb on system 2 such that it waits for a connection on a TCP socket and then does its stuff. The class GServer in the standard library may help you, or read up on DRb. -- Posted via http://www.ruby-forum.com/.