Hi all, I''m having trouble getting images to show up on the browser. I added an image to the public/images directory in Textmate, however all I get is the image alt information when I refresh my browser. This is the image tag code copied and pasted from my layout file: <%= image_tag("kanagawa.jpg") %> This is the error I get in the server log: Processing ApplicationController#index (for XXX.X.X.X at 2009-11-08 15:50:00) [GET] ActionController::RoutingError (No route matches "/images/kanagawa.jpg" with {:method=>:get}): Rendering rescues/layout (not_found) In addition (oddly), whenever I close Textmate out and reopen it, the image file I inserted in public/images is gone. I couldn''t find anything helpful from google when I entered the information. I appreciate any help. -- Posted via http://www.ruby-forum.com/.
Chris To wrote:> Hi all, > > I''m having trouble getting images to show up on the browser. I added an > image to the public/images directory in Textmate, however all I get is > the image alt information when I refresh my browser.[...]> > In addition (oddly), whenever I close Textmate out and reopen it, the > image file I inserted in public/images is gone. I couldn''t find anything > helpful from google when I entered the information. > > I appreciate any help.Sounds like the image file isn''t actually getting put where you think it is. Why not use the Finder or the command line to put the file in the right place? Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Hi Chris> <%= image_tag("kanagawa.jpg") %>What happens if you try with <%= image_tag("/images/kanagawa.jpg") %> Sijo -- Posted via http://www.ruby-forum.com/.
Sijo k g wrote:> Hi Chris >> <%= image_tag("kanagawa.jpg") %> > > What happens if you try with > > <%= image_tag("/images/kanagawa.jpg") %>That should not be necessary.> > > > SijoBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Marnen Laibow-Koser wrote:> Chris To wrote: >> Hi all, >> >> I''m having trouble getting images to show up on the browser. I added an >> image to the public/images directory in Textmate, however all I get is >> the image alt information when I refresh my browser. > [...] >> >> In addition (oddly), whenever I close Textmate out and reopen it, the >> image file I inserted in public/images is gone. I couldn''t find anything >> helpful from google when I entered the information. >> >> I appreciate any help. > > Sounds like the image file isn''t actually getting put where you think it > is. Why not use the Finder or the command line to put the file in the > right place? > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.orgThanks for the replies everyone, Adding the file directly within the finder worked (Marnen''s suggestion). I tried doing <%= image_tag("/images/kanagawa.jpg") %> but that didn''t work either. Adding image files that aren''t really associated with your application must be a curiosity within Textmate itself. Thanks everyone for your help! -- Posted via http://www.ruby-forum.com/.