From: ChrisH Date: 2006-03-07T06:13:42+09:00 Subject: Re: if File.exist? does not work misiek wrote: > I got like: > > > if File.exist? > "#{RAILS_ROOT}/public/images/#{property.id}/middle/#{image.name}" > File.unlink > "#{RAILS_ROOT}/public/images/#{property.id}/middle/#{image.name}" > end > > why it does not work ? > > > error > No such file or directory - > script/../config/../public/images/144/middle/cfa9a31932bea2904485b56294764a6b.jpg The snippet you posted works, assuming the wrapping is introduced by the post software. Could there be a typo that is causing the 'if' to be treated as the end of a previous statement? This would also require a 'begin' to match the 'end'... cheers