Hello, I have a problem with the render :partial method in all my rails webapplications. I noticed that using render :partial will generate spaces (mainly top spaces) on the elements inserted. As all my websites are seperated by module (basicaly header, content, menu, footer) it''s quite a problem as I have to set negative margin- top to various parts for the site to display as expected and it''s getting very difficult to obtain a cross-browser homogeneous design. Anyone as the same problem? Any idea what I am doing wrong here? Thanks for the help. -- 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.
On 19 October 2010 20:51, CiriusMex <ciriusmex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello, I have a problem with the render :partial method in all my > rails webapplications. I noticed that using render :partial will > generate spaces (mainly top spaces) on the elements inserted. > As all my websites are seperated by module (basicaly header, content, > menu, footer) it''s quite a problem as I have to set negative margin- > top to various parts for the site to display as expected and it''s > getting very difficult to obtain a cross-browser homogeneous design.Have you tried with some literal text as the very first line of the partial, such as <p>start of partial</p> to check the spaces are in fact before the partial, and also immediately before the render, such as <p>rendering partial</p><%= render :partial ....%> (all on one line). Colin -- 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.
Hello Colin and thanks for the idea, it didn''t even occured to me...I did as you said and it the problem seems to come from tables, not the render partial. trying to figure out what''s going on as css files don''t seem to be in cause (nothing about tables in there). On 19 oct, 15:09, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 19 October 2010 20:51, CiriusMex <cirius...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello, I have a problem with the render :partial method in all my > > rails webapplications. I noticed that using render :partial will > > generate spaces (mainly top spaces) on the elements inserted. > > As all my websites are seperated by module (basicaly header, content, > > menu, footer) it''s quite a problem as I have to set negative margin- > > top to various parts for the site to display as expected and it''s > > getting very difficult to obtain a cross-browser homogeneous design. > > Have you tried with some literal text as the very first line of the > partial, such as > <p>start of partial</p> > to check the spaces are in fact before the partial, and also > immediately before the render, such as > <p>rendering partial</p><%= render :partial ....%> > (all on one line). > > Colin-- 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.
Hello Colin and thanks for the idea, it didn''t even occured to me!...I did as you said and it the problem seems to come from the inner components (tables, divs...) because when I writea text at the beginning of the partial page it shows correctly (without extra spaces), not the render partial. trying to figure out what''s going on as css files don''t seem to be in cause. On 19 oct, 15:09, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 19 October 2010 20:51, CiriusMex <cirius...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello, I have a problem with the render :partial method in all my > > rails webapplications. I noticed that using render :partial will > > generate spaces (mainly top spaces) on the elements inserted. > > As all my websites are seperated by module (basicaly header, content, > > menu, footer) it''s quite a problem as I have to set negative margin- > > top to various parts for the site to display as expected and it''s > > getting very difficult to obtain a cross-browser homogeneous design. > > Have you tried with some literal text as the very first line of the > partial, such as > <p>start of partial</p> > to check the spaces are in fact before the partial, and also > immediately before the render, such as > <p>rendering partial</p><%= render :partial ....%> > (all on one line). > > Colin-- 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.
On 19 October 2010 21:59, CiriusMex <ciriusmex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello Colin and thanks for the idea, it didn''t even occured to me...I > did as you said and it the problem seems to come from tables, not the > render partial. trying to figure out what''s going on as css files > don''t seem to be in cause (nothing about tables in there).Every browser has its own (and different from each other) default values for padding, margin, etc, for all elements (and for cell spacing, borders and the rest for tables). Are you using a "reset" CSS stylesheet to set everything to a common, blank baseline? If not, it will get rid of a large majority of "cross browser" display issues. And if white-space is still an issue don''t forget about the "-" before closing Ruby tags to suppress it. -- 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.
Hello Michael, what about the "-", what is it? On 19 oct, 16:08, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 19 October 2010 21:59, CiriusMex <cirius...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello Colin and thanks for the idea, it didn''t even occured to me...I > > did as you said and it the problem seems to come from tables, not the > > render partial. trying to figure out what''s going on as css files > > don''t seem to be in cause (nothing about tables in there). > > Every browser has its own (and different from each other) default > values for padding, margin, etc, for all elements (and for cell > spacing, borders and the rest for tables). Are you using a "reset" CSS > stylesheet to set everything to a common, blank baseline? If not, it > will get rid of a large majority of "cross browser" display issues. > > And if white-space is still an issue don''t forget about the "-" before > closing Ruby tags to suppress it.-- 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.
On 19 October 2010 22:18, CiriusMex <ciriusmex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello Michael, what about the "-", what is it?The docs explain it right at the top... http://api.rubyonrails.org/classes/ActionView/Base.html -- 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.
Ok, I checked the doc but I don''t fully understand: - First what is the "-" you was talking about? I can''t see any reference to this - Second about this: "If you absolutely must write from within a function use concat. suppress leading and trailing whitespace, including the trailing newline, and can be used interchangeably with ." Does it means I have to use functions to display my contents? I don''t get it... On 19 oct, 17:06, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 19 October 2010 22:18, CiriusMex <cirius...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hello Michael, what about the "-", what is it? > > The docs explain it right at the top... > > http://api.rubyonrails.org/classes/ActionView/Base.html-- 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.
On 19 October 2010 23:22, CiriusMex <ciriusmex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok, I checked the doc but I don''t fully understand: > - First what is the "-" you was talking about? I can''t see any > reference to thisThe first line about ERb says "You trigger ERb by using embeddings such as <% %>, <% -%>, and <%= %>"> - Second about this: > "If you absolutely must write from within a function use concat. > suppress leading and trailing whitespace, including the trailing > newline, and can be used interchangeably with ."So you did see it - the "suppress leading and trailing whitespace" line that you quote part of (which probably due to HTML emails has gotten fubared) is talking about <%- and -%>.> Does it means I have to use functions to display my contents? I don''t > get it...No. It says "if" - some people insist on doing smelly things - like rendering output while they''re in functions - and *if* someone insists on doing that, it''s better to use "concat" than to use ERb tags. But it''s better yet to *not* output from functions at all. http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html#method-i-concat If you have a partial that does this: <% if true %> The outcome of the statement is <%= "true" %> <% end %> ...if you look in the source, you''ll see some extra whitespace. If you care about getting rid of it at all (for the most part, I don''t), you could do this instead: <%- if true -%> The outcome of the statement is <%= "true" -%> <%- end -%> ... or someone who spends more time fiddling with the rendering of Rails apps than I do will probably tell you that an *even better* solution is to use something like HAML. All these options are choices for you (since you were raising the issue of white-space) - nothing is set in stone. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thank you very much, I checked the link with FF and see all the information you''re talking about (for some reason IE wouldn''t display the tags). I will try this right now! On 20 oct, 02:30, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 19 October 2010 23:22, CiriusMex <cirius...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Ok, I checked the doc but I don''t fully understand: > > - First what is the "-" you was talking about? I can''t see any > > reference to this > > The first line about ERb says "You trigger ERb by using embeddings > such as <% %>, <% -%>, and <%= %>" > > > - Second about this: > > "If you absolutely must write from within a function use concat. > > suppress leading and trailing whitespace, including the trailing > > newline, and can be used interchangeably with ." > > So you did see it - the "suppress leading and trailing whitespace" > line that you quote part of (which probably due to HTML emails has > gotten fubared) is talking about <%- and -%>. > > > Does it means I have to use functions to display my contents? I don''t > > get it... > > No. It says "if" - some people insist on doing smelly things - like > rendering output while they''re in functions - and *if* someone insists > on doing that, it''s better to use "concat" than to use ERb tags. But > it''s better yet to *not* output from functions at all.http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html... > > If you have a partial that does this: > <% if true %> > The outcome of the statement is <%= "true" %> > <% end %> > > ...if you look in the source, you''ll see some extra whitespace. If you > care about getting rid of it at all (for the most part, I don''t), you > could do this instead: > > <%- if true -%> > The outcome of the statement is <%= "true" -%> > <%- end -%> > > ... or someone who spends more time fiddling with the rendering of > Rails apps than I do will probably tell you that an *even better* > solution is to use something like HAML. All these options are choices > for you (since you were raising the issue of white-space) - nothing is > set in stone.-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Ok, no luck here, I added "-" to the main page but still seeing strange spaces. The weirdest thing is that in the generated html code there is no html tag corresponding to those spaces...But still, my tables and divs have a top white space I can''t explain. On 20 oct, 02:30, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 19 October 2010 23:22, CiriusMex <cirius...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Ok, I checked the doc but I don''t fully understand: > > - First what is the "-" you was talking about? I can''t see any > > reference to this > > The first line about ERb says "You trigger ERb by using embeddings > such as <% %>, <% -%>, and <%= %>" > > > - Second about this: > > "If you absolutely must write from within a function use concat. > > suppress leading and trailing whitespace, including the trailing > > newline, and can be used interchangeably with ." > > So you did see it - the "suppress leading and trailing whitespace" > line that you quote part of (which probably due to HTML emails has > gotten fubared) is talking about <%- and -%>. > > > Does it means I have to use functions to display my contents? I don''t > > get it... > > No. It says "if" - some people insist on doing smelly things - like > rendering output while they''re in functions - and *if* someone insists > on doing that, it''s better to use "concat" than to use ERb tags. But > it''s better yet to *not* output from functions at all.http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html... > > If you have a partial that does this: > <% if true %> > The outcome of the statement is <%= "true" %> > <% end %> > > ...if you look in the source, you''ll see some extra whitespace. If you > care about getting rid of it at all (for the most part, I don''t), you > could do this instead: > > <%- if true -%> > The outcome of the statement is <%= "true" -%> > <%- end -%> > > ... or someone who spends more time fiddling with the rendering of > Rails apps than I do will probably tell you that an *even better* > solution is to use something like HAML. All these options are choices > for you (since you were raising the issue of white-space) - nothing is > set in stone.-- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 20 October 2010 16:15, CiriusMex <ciriusmex-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Ok, no luck here, I added "-" to the main page but still seeing > strange spaces. The weirdest thing is that in the generated html code > there is no html tag corresponding to those spaces...But still, my > tables and divs have a top white space I can''t explain.Please don''t top post, it makes it difficult to follow the thread. Thanks. If you install firebug in firefox you can click on various sections of the page and get it to show you the css styles applicable to that element, and where that style has come from. This may give you a clue. Colin> > On 20 oct, 02:30, Michael Pavling <pavl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On 19 October 2010 23:22, CiriusMex <cirius...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> > Ok, I checked the doc but I don''t fully understand: >> > - First what is the "-" you was talking about? I can''t see any >> > reference to this >> >> The first line about ERb says "You trigger ERb by using embeddings >> such as <% %>, <% -%>, and <%= %>" >> >> > - Second about this: >> > "If you absolutely must write from within a function use concat. >> > suppress leading and trailing whitespace, including the trailing >> > newline, and can be used interchangeably with ." >> >> So you did see it - the "suppress leading and trailing whitespace" >> line that you quote part of (which probably due to HTML emails has >> gotten fubared) is talking about <%- and -%>. >> >> > Does it means I have to use functions to display my contents? I don''t >> > get it... >> >> No. It says "if" - some people insist on doing smelly things - like >> rendering output while they''re in functions - and *if* someone insists >> on doing that, it''s better to use "concat" than to use ERb tags. But >> it''s better yet to *not* output from functions at all.http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html... >> >> If you have a partial that does this: >> <% if true %> >> The outcome of the statement is <%= "true" %> >> <% end %> >> >> ...if you look in the source, you''ll see some extra whitespace. If you >> care about getting rid of it at all (for the most part, I don''t), you >> could do this instead: >> >> <%- if true -%> >> The outcome of the statement is <%= "true" -%> >> <%- end -%> >> >> ... or someone who spends more time fiddling with the rendering of >> Rails apps than I do will probably tell you that an *even better* >> solution is to use something like HAML. All these options are choices >> for you (since you were raising the issue of white-space) - nothing is >> set in stone. > > -- > 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@googlegroups.com. > For more options, visit this group at http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I, too, am getting this problem. Using <%- -%> wouldn''t solve this, since it suppresses white space in the source HTML, not on the page. I can paste the exact same text from my partial into my view and the page renders fine. The moment I go to the partial, even though the source HTML looks identical, I have additional white space on top. Urrrgh. -- 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.
On 4 November 2010 23:26, Darrend Brown <bravehoptoad-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I, too, am getting this problem. > > Using <%- -%> wouldn''t solve this, since it suppresses white space in > the source HTML, not on the page. > > I can paste the exact same text from my partial into my view and the > page renders fine. The moment I go to the partial, even though the > source HTML looks identical, I have additional white space on top.Are you saying that the html, viewed via View > Page Source or similar in your browser is identical in the two cases, but it shows differently in the browser? I don''t think this is possible, all the browser can see is the html (and scripts and css which we assume are identical) so it cannot tell whether you have used a partial or not. I suggest that you copy the complete page html in the two cases and paste it into two files. Then compare the files with a file comparison utility. I am sure you will see a difference. Colin -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
> > Are you saying that the html, viewed via View > Page Source or similar > in your browser is identical in the two cases, but it shows > differently in the browser? I don''t think this is possible, all the > browser can see is the html (and scripts and css which we assume are > identical) so it cannot tell whether you have used a partial or not. > I suggest that you copy the complete page html in the two cases and > paste it into two files. Then compare the files with a file > comparison utility. I am sure you will see a difference. >Yes, this is what I''m saying. The source html is identical. Comparing the two source files finds no differences, even though there is clearly extra space on the page when using a partial. Is Rails somehow interpreting the .css differently? I can''t figure it out...it''s making for some ugly, non-DRY code on my views, though. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
bravehoptoad wrote in post #961694:>> >> Are you saying that the html, viewed via View > Page Source or similar >> in your browser is identical in the two cases, but it shows >> differently in the browser? I don''t think this is possible, all the >> browser can see is the html (and scripts and css which we assume are >> identical) so it cannot tell whether you have used a partial or not. >> I suggest that you copy the complete page html in the two cases and >> paste it into two files. Then compare the files with a file >> comparison utility. I am sure you will see a difference. >> > > > Yes, this is what I''m saying. The source html is identical. > Comparing the two source files finds no differences,Wait. You said "source files". That is not what we are asking. We are asking about the *generated HTML*, as seen in the browser''s View Source, not the Ruby source files. 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.
exact same poltergeist for me on rails 3.0.1 and ruby 1.9.2. It adds some visible space in browser but completely invisible in the generated HTML. it seems to be when the partial starts by a tag (like "<form ...>"). It''s not a space but a linebreak. If partial starts by basic simple text it''s fine. I checked my ruby source files encoding and it''s plain good utf8. The generated html may look exactly the same using ''source>view'' in both cases but i''m wondering if there might be some fancy digits making this linebreak. On 16 nov, 00:11, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> bravehoptoad wrote in post #961694: > > > > >> Are you saying that the html, viewed via View > Page Source or similar > >> in your browser is identical in the two cases, but it shows > >> differently in the browser? I don''t think this is possible, all the > >> browser can see is the html (and scripts and css which we assume are > >> identical) so it cannot tell whether you have used a partial or not. > >> I suggest that you copy the complete page html in the two cases and > >> paste it into two files. Then compare the files with a file > >> comparison utility. I am sure you will see a difference. > > > Yes, this is what I''m saying. The source html is identical. > > Comparing the two source files finds no differences, > > Wait. You said "source files". That is not what we are asking. > > We are asking about the *generated HTML*, as seen in the browser''s View > Source, not the Ruby source files. > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > Posted viahttp://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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 5 December 2010 22:44, Julien <julien.apack-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> exact same poltergeist for me on rails 3.0.1 and ruby 1.9.2. It adds > some visible space in browser but completely invisible in the > generated HTML. > > it seems to be when the partial starts by a tag (like "<form ...>"). > It''s not a space but a linebreak. If partial starts by basic simple > text it''s fine. > I checked my ruby source files encoding and it''s plain good utf8. > > The generated html may look exactly the same using ''source>view'' in > both cases but i''m wondering if there might be some fancy digits > making this linebreak.If the html (and javascript and css) are the same then it must render the same, that is all the browser has to go on. Copy and paste the html into a text file for each case and then do a file compare. Also if you want to see where the extra space is coming from use firebug in firefox and you can see which div or whatever the space is in and how the area is styled. I note that the OP was not heard from again after he was asked to check the generated html in this way (with the request re-inforced by Marnen as it appeared he may not have understood that it was the html that was to be compared). Colin -- 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.
On 6 déc, 09:53, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 5 December 2010 22:44, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > exact same poltergeist for me on rails 3.0.1 and ruby 1.9.2. It adds > > some visible space in browser but completely invisible in the > > generated HTML. > > > it seems to be when the partial starts by a tag (like "<form ...>"). > > It''s not a space but a linebreak. If partial starts by basic simple > > text it''s fine. > > I checked my ruby source files encoding and it''s plain good utf8. > > > The generated html may look exactly the same using ''source>view'' in > > both cases but i''m wondering if there might be some fancy digits > > making this linebreak. > > If the html (and javascript and css) are the same then it must render > the same, that is all the browser has to go on. Copy and paste the > html into a text file for each case and then do a file compare. Also > if you want to see where the extra space is coming from use firebug in > firefox and you can see which div or whatever the space is in and how > the area is styled. > > I note that the OP was not heard from again after he was asked to > check the generated html in this way (with the request re-inforced by > Marnen as it appeared he may not have understood that it was the html > that was to be compared). > > ColinHi ! Thanks for reply, i have news: In Firefox, the generated html seems exactly the same, but in Chrome, i can see an extra-digit. Screen: http://lh4.ggpht.com/_Hc_PJsJ5czI/TPy9KFd3RsI/AAAAAAABNIc/bApGqfK32fE/Chrome-strange-digit.png So it''s no css issue. the fact that it adds a space (seen as linebreak) is because it''s seen by browser as something to print, so if your template starts by <h1> or <form...> it''s by default printed on next line. So even if it''s no css issue, css can correct it if you define "display:inline;" for your <h1>, <form>, etc... Still, why this digit appears is a mystery and my guess would be that either: -server (in my case: WebRick) outputs some tiny bits of crap when mixing views -my komodo editor added some stuff at the beggining of my ruby files but i can''t see anything special when opening my ruby code with radrails. hope this will help someone! -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 December 2010 11:03, Julien <julien.apack-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 6 déc, 09:53, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: >> On 5 December 2010 22:44, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> >> > exact same poltergeist for me on rails 3.0.1 and ruby 1.9.2. It adds >> > some visible space in browser but completely invisible in the >> > generated HTML. >> >> > it seems to be when the partial starts by a tag (like "<form ...>"). >> > It''s not a space but a linebreak. If partial starts by basic simple >> > text it''s fine. >> > I checked my ruby source files encoding and it''s plain good utf8. >> >> > The generated html may look exactly the same using ''source>view'' in >> > both cases but i''m wondering if there might be some fancy digits >> > making this linebreak. >> >> If the html (and javascript and css) are the same then it must render >> the same, that is all the browser has to go on. Copy and paste the >> html into a text file for each case and then do a file compare. Also >> if you want to see where the extra space is coming from use firebug in >> firefox and you can see which div or whatever the space is in and how >> the area is styled. >> >> I note that the OP was not heard from again after he was asked to >> check the generated html in this way (with the request re-inforced by >> Marnen as it appeared he may not have understood that it was the html >> that was to be compared). >> >> Colin > > > Hi ! Thanks for reply, i have news: > In Firefox, the generated html seems exactly the same, but in Chrome, > i can see an extra-digit. > Screen: http://lh4.ggpht.com/_Hc_PJsJ5czI/TPy9KFd3RsI/AAAAAAABNIc/bApGqfK32fE/Chrome-strange-digit.pngWell I have to apologise for suggesting that if the html looked the same then it would render the same. I had not allowed for non-displaying characters. I wonder whether you are on developing on windows? I seem to remember a problem with <%- -%> that the - removed the LF but not the CR in files with CRLF line endings. Colin -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 déc, 12:30, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> On 6 December 2010 11:03, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > > > > On 6 déc, 09:53, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > >> On 5 December 2010 22:44, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > >> > exact same poltergeist for me on rails 3.0.1 and ruby 1.9.2. It adds > >> > some visible space in browser but completely invisible in the > >> > generated HTML. > > >> > it seems to be when the partial starts by a tag (like "<form ...>"). > >> > It''s not a space but a linebreak. If partial starts by basic simple > >> > text it''s fine. > >> > I checked my ruby source files encoding and it''s plain good utf8. > > >> > The generated html may look exactly the same using ''source>view'' in > >> > both cases but i''m wondering if there might be some fancy digits > >> > making this linebreak. > > >> If the html (and javascript and css) are the same then it must render > >> the same, that is all the browser has to go on. Copy and paste the > >> html into a text file for each case and then do a file compare. Also > >> if you want to see where the extra space is coming from use firebug in > >> firefox and you can see which div or whatever the space is in and how > >> the area is styled. > > >> I note that the OP was not heard from again after he was asked to > >> check the generated html in this way (with the request re-inforced by > >> Marnen as it appeared he may not have understood that it was the html > >> that was to be compared). > > >> Colin > > > Hi ! Thanks for reply, i have news: > > In Firefox, the generated html seems exactly the same, but in Chrome, > > i can see an extra-digit. > > Screen:http://lh4.ggpht.com/_Hc_PJsJ5czI/TPy9KFd3RsI/AAAAAAABNIc/bApGqfK32fE... > > Well I have to apologise for suggesting that if the html looked the > same then it would render the same. I had not allowed for > non-displaying characters. I wonder whether you are on developing on > windows? I seem to remember a problem with <%- -%> that the - > removed the LF but not the CR in files with CRLF line endings. > > ColinYep, Windows. When i print special chars in Komodo, i see LF ending each line, but no CR. I''m really not at ease with those file format issues, can''t be really helpful on that, sorry :( -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 déc, 15:28, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 6 déc, 12:30, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > > > > > > > On 6 December 2010 11:03, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > On 6 déc, 09:53, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > >> On 5 December 2010 22:44, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> > exact same poltergeist for me on rails 3.0.1 and ruby 1.9.2. It adds > > >> > some visible space in browser but completely invisible in the > > >> > generated HTML. > > > >> > it seems to be when the partial starts by a tag (like "<form ...>"). > > >> > It''s not a space but a linebreak. If partial starts by basic simple > > >> > text it''s fine. > > >> > I checked my ruby source files encoding and it''s plain good utf8. > > > >> > The generated html may look exactly the same using ''source>view'' in > > >> > both cases but i''m wondering if there might be some fancy digits > > >> > making this linebreak. > > > >> If the html (and javascript and css) are the same then it must render > > >> the same, that is all the browser has to go on. Copy and paste the > > >> html into a text file for each case and then do a file compare. Also > > >> if you want to see where the extra space is coming from use firebug in > > >> firefox and you can see which div or whatever the space is in and how > > >> the area is styled. > > > >> I note that the OP was not heard from again after he was asked to > > >> check the generated html in this way (with the request re-inforced by > > >> Marnen as it appeared he may not have understood that it was the html > > >> that was to be compared). > > > >> Colin > > > > Hi ! Thanks for reply, i have news: > > > In Firefox, the generated html seems exactly the same, but in Chrome, > > > i can see an extra-digit. > > > Screen:http://lh4.ggpht.com/_Hc_PJsJ5czI/TPy9KFd3RsI/AAAAAAABNIc/bApGqfK32fE... > > > Well I have to apologise for suggesting that if the html looked the > > same then it would render the same. I had not allowed for > > non-displaying characters. I wonder whether you are on developing on > > windows? I seem to remember a problem with <%- -%> that the - > > removed the LF but not the CR in files with CRLF line endings. > > > Colin > > Yep, Windows. When i print special chars in Komodo, i see LF ending > each line, but no CR. I''m really not at ease with those file format > issues, can''t be really helpful on that, sorry :(Confirmation of my second guess: It''s Komodo Editor, adding ugly stuff. I''ve open and added some files in the projects using Radrails and everything is okay. Though i have no way to correct files corrupted by Komodo (open and save doesn''t do the trick). Damn Komodo!!! And maybe some other text-editors generate the same kind of horror. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
if it''s the adding of cr/lf, try scite - it has the ability to specify and convert eol to and from cr, cr/lf, or lf. A bit of a pain to do manually, but I dn''t know how to do automatically. On 6 December 2010 18:45, Julien <julien.apack-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 6 déc, 15:28, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On 6 déc, 12:30, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > > > > > > > > > > > > > > > > > > > On 6 December 2010 11:03, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > On 6 déc, 09:53, Colin Law <clan...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote: > > > >> On 5 December 2010 22:44, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > >> > exact same poltergeist for me on rails 3.0.1 and ruby 1.9.2. It > adds > > > >> > some visible space in browser but completely invisible in the > > > >> > generated HTML. > > > > > >> > it seems to be when the partial starts by a tag (like "<form > ...>"). > > > >> > It''s not a space but a linebreak. If partial starts by basic > simple > > > >> > text it''s fine. > > > >> > I checked my ruby source files encoding and it''s plain good utf8. > > > > > >> > The generated html may look exactly the same using ''source>view'' > in > > > >> > both cases but i''m wondering if there might be some fancy digits > > > >> > making this linebreak. > > > > > >> If the html (and javascript and css) are the same then it must > render > > > >> the same, that is all the browser has to go on. Copy and paste the > > > >> html into a text file for each case and then do a file compare. > Also > > > >> if you want to see where the extra space is coming from use firebug > in > > > >> firefox and you can see which div or whatever the space is in and > how > > > >> the area is styled. > > > > > >> I note that the OP was not heard from again after he was asked to > > > >> check the generated html in this way (with the request re-inforced > by > > > >> Marnen as it appeared he may not have understood that it was the > html > > > >> that was to be compared). > > > > > >> Colin > > > > > > Hi ! Thanks for reply, i have news: > > > > In Firefox, the generated html seems exactly the same, but in Chrome, > > > > i can see an extra-digit. > > > > Screen: > http://lh4.ggpht.com/_Hc_PJsJ5czI/TPy9KFd3RsI/AAAAAAABNIc/bApGqfK32fE... > > > > > Well I have to apologise for suggesting that if the html looked the > > > same then it would render the same. I had not allowed for > > > non-displaying characters. I wonder whether you are on developing on > > > windows? I seem to remember a problem with <%- -%> that the - > > > removed the LF but not the CR in files with CRLF line endings. > > > > > Colin > > > > Yep, Windows. When i print special chars in Komodo, i see LF ending > > each line, but no CR. I''m really not at ease with those file format > > issues, can''t be really helpful on that, sorry :( > > Confirmation of my second guess: > > It''s Komodo Editor, adding ugly stuff. > I''ve open and added some files in the projects using Radrails and > everything is okay. > Though i have no way to correct files corrupted by Komodo (open and > save doesn''t do the trick). > Damn Komodo!!! And maybe some other text-editors generate the same > kind of horror. > > -- > 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Julien wrote in post #966616:> On 6 dc, 15:28, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > On 6 December 2010 11:03, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> > >> > text it''s fine. >> > >> firefox and you can see which div or whatever the space is in and how >> > > In Firefox, the generated html seems exactly the same, but in Chrome, >> >> Yep, Windows. When i print special chars in Komodo, i see LF ending >> each line, but no CR. I''m really not at ease with those file format >> issues, can''t be really helpful on that, sorry :( > > Confirmation of my second guess: > > It''s Komodo Editor, adding ugly stuff.I use KomodoEdit all the time (on Mac OS, not Windows), and I''ve never seen it do this. What are your line ending preferences set to (that should be somewhere in the status bar)? 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.
On 6 déc, 20:50, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Julien wrote in post #966616: > > > On 6 dc, 15:28, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > On 6 December 2010 11:03, Julien <julien.ap...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> > >> > text it''s fine. > >> > >> firefox and you can see which div or whatever the space is in and how > >> > > In Firefox, the generated html seems exactly the same, but in Chrome, > > >> Yep, Windows. When i print special chars in Komodo, i see LF ending > >> each line, but no CR. I''m really not at ease with those file format > >> issues, can''t be really helpful on that, sorry :( > > > Confirmation of my second guess: > > > It''s Komodo Editor, adding ugly stuff. > > I use KomodoEdit all the time (on Mac OS, not Windows), and I''ve never > seen it do this. What are your line ending preferences set to (that > should be somewhere in the status bar)? > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > -- > Posted viahttp://www.ruby-forum.com/.I tried Scite and converted some CR/LF endings to LF only but it doesn''t correct the issue. My gut tells me it''s not an matter of line endings since the strange digit appears at the very beggining of the inclusion of the partial (or the yield). I don''t know much about file system but i suppose Komodo was created on Linux and uses some file headers which are not correctly understood by Webrick on Windows which then tries to print them. I don''t have that many partials and will simply recreate them and copy/ paste the code using radrails. I should have guessed that the editor was to blame before, because i finished a previous full project on Radrails and never encountered that problem. I switched because Radrails is a slow when you ctrl+s. Well i guess the conclusion of all this is that if you encounter unwanted spaces in your partials, check your editor :) -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 December 2010 07:11, Julien <julien.apack-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Well i guess the conclusion of all this is that if you encounter > unwanted spaces in your partials, check your editor :)It would be interesting to inspect the file with a hex editor to see exactly what the non-printing chars are. They are not tabs are they? Colin -- 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.
Julien wrote in post #966777: [...]> My gut tells me it''s not an matter of line endings since the strange > digit appears at the very beggining of the inclusion of the partial > (or the yield). I don''t know much about file system but i suppose > Komodo was created on Linux and uses some file headers which are not > correctly understood by Webrick on Windows which then tries to print > them.Since you don''t know much about the filesystem, perhaps you shouldn''t be making silly speculations. Komodo does no such thing AFAIK. What *might* be going on is that your file is being saved as UTF-8 with a byte order mark (BOM) at the beginning. That shouldn''t cause problems, but try changing the encoding to UTF-8 without BOM and see what happens. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 December 2010 13:38, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Julien wrote in post #966777: > [...] >> My gut tells me it''s not an matter of line endings since the strange >> digit appears at the very beggining of the inclusion of the partial >> (or the yield). I don''t know much about file system but i suppose >> Komodo was created on Linux and uses some file headers which are not >> correctly understood by Webrick on Windows which then tries to print >> them. > > Since you don''t know much about the filesystem, perhaps you shouldn''t be > making silly speculations. Komodo does no such thing AFAIK. > > What *might* be going on is that your file is being saved as UTF-8 with > a byte order mark (BOM) at the beginning. That shouldn''t cause > problems, but try changing the encoding to UTF-8 without BOM and see > what happens.Jumping the gun I know, but if it were the BOM then would that be a bug in rails as a BOM at the start of a partial should not be sent out to the browser, should it? Colin -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote in post #966863:> On 7 December 2010 13:38, Marnen Laibow-Koser <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > wrote: >> making silly speculations. Komodo does no such thing AFAIK. >> >> What *might* be going on is that your file is being saved as UTF-8 with >> a byte order mark (BOM) at the beginning. That shouldn''t cause >> problems, but try changing the encoding to UTF-8 without BOM and see >> what happens. > > Jumping the gun I know, but if it were the BOM then would that be a > bug in rails as a BOM at the start of a partial should not be sent out > to the browser, should it?It actually shouldn''t matter. The BOM was chosen rather cleverly: it''s U+FEFF ZERO-WIDTH NONBREAKING SPACE, so it should have no typographical effect whatsoever. But maybe the browser is detecting it as whitespace, or maybe there''s a further encoding issue. Or maybe something else is going on.> > ColinBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org Sent from my iPhone -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''m not sure it''s the editor; my own issues are coming with Notepad+ +. Still, I''m glad I checked back into this thread. It''s given me some stuff to try out. If I find the magic solution (or if I don''t) I''ll check back in. -- 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.
Okay, here''s what I''ve got so far: If I encode in ANSI or UTF-8 without BOM, I lose my phantom spaces. If I encode in plain old UTF-8, phantom spaces with my partials. Dunno why...but at least I can use partials again without mucking up my page. One small step for man, I know.... -- 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.
bravehoptoad wrote in post #966994:> Okay, here''s what I''ve got so far: > > If I encode in ANSI or UTF-8 without BOM, I lose my phantom spaces. > > If I encode in plain old UTF-8, phantom spaces with my partials. > > Dunno why...You''ve got your answer, I guess. It *is* the BOM creating problems, or so it would seem from the behavior above. Just checking: UTF-8 without BOM: no problems UTF-8 with BOM: problems Right? If so, then we have isolated the problem to a minimal pair.> but at least I can use partials again without mucking up > my page. > > One small step for man, I know....I''ve never seen this problem on *nix. I wonder if it''s an artifact of Windows'' text handling routines. 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.
> Just checking: > UTF-8 without BOM: no problems > UTF-8 with BOM: problems > Right? >Correct.> > I''ve never seen this problem on *nix. I wonder if it''s an artifact of > Windows'' text handling routines. >Yes, I strongly suspect, since the two people who''ve had this problem are working on Windows with different text editors. This was a great thread. I never would have looked at the encoding without you guys. -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 déc, 21:54, bravehoptoad <bravehopt...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Just checking: > > UTF-8 without BOM: no problems > > UTF-8 with BOM: problems > > Right? > > Correct. > > > > > I''ve never seen this problem on *nix. I wonder if it''s an artifact of > > Windows'' text handling routines. > > Yes, I strongly suspect, since the two people who''ve had this problem > are working on Windows with different text editors. > > This was a great thread. I never would have looked at the encoding > without you guys.Hey you rock people, UTF8 without BOM is perfect. Sorry for silly speculations on Komodo :) Glad we found the root of it. Thank you all! -- 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@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.