From: David Masover Date: 2010-01-18T02:19:25+09:00 Subject: Re: capistrano: saving a result on var On Sunday 17 January 2010 09:19:17 am Jean-Julien Fleck wrote: > Hello botp, > > > task :testing do > > x = run "date" > > p x > > end > > > > it runs without error but i get nothing (nil ie) from x > > Use backstiks: > >> x = `date` > > => "Sun Jan 17 16:18:45 CET 2010\n" I don't know why you'd want to run 'date' instead of Time.now from within Ruby, but the one reason I can think of is that Capistrano's #run isn't the equivalent of #system -- it runs a command on the remote system. I'm guessing the point here is to do something with the remote system's date, specifically. In that case, `date` is useless, as backticks run commands locally.