File.exists?() runs on your local machine. You'll need to test for remote files using bash script and the `test` program (man 1 test)
- Lee Hambley On 2 January 2013 18:34, byrnejb <[email protected]> wrote: > I have this in my deploy.rb > > run( %Q( echo $(ls -la /var/data/hll_th/etc/hll_th.d/database.yml) ) ) > puts( File.exists?( "/var/data/hll_th/etc/hll_th.d/database.yml" ).to_s ) > > Running that task gives this result: > > ** [out :: inet01.hamilton.harte-lyne.ca] -rw-r--r-- 1 theheart theheart > 0 Jan 2 11:59 /var/data/hll_th/etc/hll_th.d/database.yml > command finished in 21ms > false > > Why am I getting a false return from File.exists?() when testing for a > file that the remote system shows as being present? > > -- > * You received this message because you are subscribed to the Google > Groups "Capistrano" group. > * To post to this group, send email to [email protected] > * To unsubscribe from this group, send email to > [email protected] For more options, visit this > group at http://groups.google.com/group/capistrano?hl=en -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
