Hello guys, We developed in windows and deployed on Linux server. Most of our partials started behaving indecently. Our coding <%= render :partial => ''./shared/footer'' %> Deployment works with <%= render :partial => ''/shared/footer'' %> We have images in folders public/images/flags and public/images/ twitter which we used to access image_tag("./twitter/twitter.png" Now in deployment image_tag("./twitter/twitter.png" of course does not work but also image_tag("/twitter/twitter.png" doesnt work. Does any one know about this?
Quoting Ritvvij <ritvij.j-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > Hello guys, > > We developed in windows and deployed on Linux server. Most of our > partials started behaving indecently. > Our coding <%= render :partial => ''./shared/footer'' %> > Deployment works with <%= render :partial => ''/shared/footer'' %> >How about <%= render :partial => ''shared/footer'' %> Jeffrey
2009/8/29 Ritvvij <ritvij.j-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > Hello guys, > > We developed in windows and deployed on Linux server. Most of our > partials started behaving indecently. > Our coding <%= render :partial => ''./shared/footer'' %> > Deployment works with <%= render :partial => ''/shared/footer'' %> > > We have images in folders public/images/flags and public/images/ > twitter > which we used to access image_tag("./twitter/twitter.png" > Now in deployment image_tag("./twitter/twitter.png" of course does not > work but also image_tag("/twitter/twitter.png" doesnt work. > > Does any one know about this?If the images are in public/images/twitter them image_tag("twitter/twitter.png") should work. If not have a look at the html source in the browser and see where it is pointing. Colin
ain''t the problem the . you''re using in the path? In Linux the . points to the root directory of he user, and not nescecarly to the root of the tree you''re in. I could be mistaken though. 2009/8/29 Colin Law <clanlaw-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>> > 2009/8/29 Ritvvij <ritvij.j-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>: > > > > Hello guys, > > > > We developed in windows and deployed on Linux server. Most of our > > partials started behaving indecently. > > Our coding <%= render :partial => ''./shared/footer'' %> > > Deployment works with <%= render :partial => ''/shared/footer'' %> > > > > We have images in folders public/images/flags and public/images/ > > twitter > > which we used to access image_tag("./twitter/twitter.png" > > Now in deployment image_tag("./twitter/twitter.png" of course does not > > work but also image_tag("/twitter/twitter.png" doesnt work. > > > > Does any one know about this? > > If the images are in public/images/twitter them > image_tag("twitter/twitter.png") should work. If not have a look at > the html source in the browser and see where it is pointing. > > Colin > > > >-- Arne De Herdt Blog: http://risusmumblings.blogspot.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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Sat, Aug 29, 2009 at 8:15 AM, Arne De Herdt<arne.de.herdt-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> In Linux the . points to the root directory of he user, and not nescecarly > to the root of the tree you''re in. > > I could be mistaken though.Uh, well, since you mentioned it, yes, you are :-) In any case, it''s trivial to test what the image_tag does with these various references: <code> <%= image_tag("images/rails.png") %> <%= image_tag("/images/rails.png") %> <%= image_tag("./images/rails.png") %> </code> <source view> <img alt="Rails" src="/images/images/rails.png"> <img alt="Rails" src="/images/rails.png?1250195549"> <img alt="Rails" src="/images/./images/rails.png"> </source view> I know which one I''ll pick :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
Quoting Hassan Schroeder <hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>:> > On Sat, Aug 29, 2009 at 8:15 AM, Arne De > Herdt<arne.de.herdt-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > In Linux the . points to the root directory of he user, and not nescecarly > > to the root of the tree you''re in. > > > > I could be mistaken though. > > Uh, well, since you mentioned it, yes, you are :-) > > In any case, it''s trivial to test what the image_tag does with these > various references: > > <code> > <%= image_tag("images/rails.png") %> > > <%= image_tag("/images/rails.png") %> > > <%= image_tag("./images/rails.png") %> > </code> > > <source view> > <img alt="Rails" src="/images/images/rails.png"> > > <img alt="Rails" src="/images/rails.png?1250195549"> > > <img alt="Rails" src="/images/./images/rails.png"> > </source view> > > I know which one I''ll pick :-) ><%= image_tag(''rails.png'') ;) Jeffrey
On Sat, Aug 29, 2009 at 1:47 PM, Jeffrey L. Taylor<ror-f/t7CGFWhwGcvWdFBKKxig@public.gmane.org> wrote:>> I know which one I''ll pick :-) >> > <%= image_tag(''rails.png'')True, that works with resources in RAILS_ROOT/public/images, but it''s important to understand how the image_tag references paths, to e.g. an alternate location like RAILS_ROOT/public/photos. Which would be problematic with the OP''s confusion... :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan
worked. THANKS A LOT :-) On Aug 29, 4:04 pm, Hassan Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Sat, Aug 29, 2009 at 1:47 PM, Jeffrey L. Taylor<r...-f/t7CGFWhwGcvWdFBKKxig@public.gmane.org> wrote: > >> I know which one I''ll pick :-) > > > <%= image_tag(''rails.png'') > > True, that works with resources in RAILS_ROOT/public/images, but > it''s important to understand how the image_tag references paths, to > e.g. an alternate location like RAILS_ROOT/public/photos. > > Which would be problematic with the OP''s confusion... :-) > > -- > Hassan Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan