From: Phillip Gawlowski Date: 2009-12-30T22:31:25+09:00 Subject: Re: How to run one script from another, and capture the output On 30.12.2009 14:06, John Smith wrote: > One more quick question. If distance_traveled.rb sits in a different > directory than the current script that's calling it, how would I specify > it? For example, say it is in ~project/lib/distance_traveled.rb output = `ruby ~project/lib/distance_traveled.rb 60 2.5` :P Or perform string interpolation, if you don't want to hardcode anything: path = "~/project/lib/" script = "script.rb" args = "my args" output = `#{path}#{script} #{args}` -- Phillip Gawlowski