On May 5, 8:53 am, MaD <[email protected]> wrote:
> maybe this is due to your relative path. are you sure the file is
> where you think it is? are you sure the current working directory is
> what you think it is?
> try File::exists?("#{RAILS_ROOT}/path/to/my/file")
>

On top of that, if the current working directory is the root of the
app (which is usually is) then with a normal setup a browser won't be
able to access that file, since its not in public.
If that's not the case then you're going to have to explain in what
way things don't work. Does it work if you try from a console? is
@content what you think it is?

Fred
> another thing: since you obviously left out some code and replaced it
> with "..." we can't be sure your code is correct. are you?
>
> On 5 Mai, 08:23, Rahul Mehta <[email protected]> wrote:
>
>
>
>
>
> > hii
>
> >                 <%if File::exists?("../data/[email protected]}")%>
>
> >                 <div id="image_holder" class ="span-10 ">
> >                                 <%= image_tag 
> > "../data/[email protected]}" %>
> >                         </div>
> >                         <%end%>
>
> > my this file exists not working
>
> > please help.
>
> > thanks
>
> > rahul
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Ruby on Rails: Talk" 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 
> > athttp://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" 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 
> athttp://groups.google.com/group/rubyonrails-talk?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to