In my .html.erb I wrote: <%= image_tag @displayPath %> <br> @displayPath = ''invalid_plot.png'' when the .erb is rendered. Viewing the page source in FF I find: <img alt="Invalid_plot" src="/images/invalid_plot.png" /> <br> The file exist in <rails_root>/images, but FF fails to display the .png. Instead the als text is displayed. Entering /home/devel/Aptana RadRails Workspace/rails_root/images/invalid_plot.png into FF displays the content of the file. What is wrong? -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Fritz Trapper wrote:> In my .html.erb I wrote: > > <%= image_tag @displayPath %> <br> > > @displayPath = ''invalid_plot.png'' when the .erb is rendered.What''s with the camelCase? That should be @display_path.> > Viewing the page source in FF I find: > > <img alt="Invalid_plot" src="/images/invalid_plot.png" /> <br> > > The file exist in <rails_root>/images, but FF fails to display the .png. > Instead the als text is displayed. > > Entering /home/devel/Aptana RadRails > Workspace/rails_root/images/invalid_plot.png into FF displays the > content of the file. > > What is wrong?Your image should be in RAILS_ROOT/public/images . Remember that the public directory is the actual webroot. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hi Fritz, Do you have a public directory? Images should be inside the public images directory so browsers can have access. Is FF the only browser that will not render the image? Also, can you go to http://www.yourdomain.com/images/invalid_plot.png ? Chris Fritz Trapper wrote:> In my .html.erb I wrote: > > <%= image_tag @displayPath %> <br> > > @displayPath = ''invalid_plot.png'' when the .erb is rendered. > > Viewing the page source in FF I find: > > <img alt="Invalid_plot" src="/images/invalid_plot.png" /> <br> > > The file exist in <rails_root>/images, but FF fails to display the .png. > Instead the als text is displayed. > > Entering /home/devel/Aptana RadRails > Workspace/rails_root/images/invalid_plot.png into FF displays the > content of the file. > > What is wrong? >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote:> Your image should be in RAILS_ROOT/public/images . Remember that the > public directory is the actual webroot.Now it works, thanks -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Chris Kershaw wrote:> Also, can you go to http://www.yourdomain.com/images/invalid_plot.png ?This is, what I did - it doesn''t work. Moving the file to .../public/images works. -- Posted via http://www.ruby-forum.com/. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.