I frequently use <% "foobar" -%> syntax (note the closing -%>) to prevent extra newlines from being rendered to the page when my template files have logic. This works fine in ruby 1.8.4 (2005-12-24) [i686-linux]. But in ruby 1.8.5 (2006-08-25) [i386-mswin32] this causes a "parse error, unexpected $, expecting kEND" error. Was the ability to use " -%>" to prevent extra newlines removed from version 1.8.4 to 1.8.5? Or is this a Linux/Windows issue? Has anyone else run into this? I would just like to know so I can get out of the habbit of using "-%>" if it is no longer supported. -- 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-/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 -~----------~----~----~----~------~----~------~--~---
On 9/26/06, Caleb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > I frequently use <% "foobar" -%> syntax (note the closing -%>) to > prevent extra newlines from being rendered to the page when my template > files have logic. This works fine in ruby 1.8.4 (2005-12-24) > [i686-linux]. But in ruby 1.8.5 (2006-08-25) [i386-mswin32] this causes > a "parse error, unexpected $, expecting kEND" error. Was the ability to > use " -%>" to prevent extra newlines removed from version 1.8.4 to > 1.8.5? Or is this a Linux/Windows issue? > > Has anyone else run into this? I would just like to know so I can get > out of the habbit of using "-%>" if it is no longer supported.I use -%> all the time on Windows. I think I''ve seen this error before though when there are tabs in the .rhtml file. If you convert these to spaces you might have some luck. Cheers --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Daniel ----- wrote:> I use -%> all the time on Windows. I think I''ve seen this error before > though when there are tabs in the .rhtml file. > > If you convert these to spaces you might have some luck.Sure enough, I did a search and replace for tabs and replaced them with spaces. Is this a difference in the way Linux and Windows encode/read tab characters? If it isn''t an encoding issue then this seems like a ruby bug (since it works in one environment and not the other). -- 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-/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 -~----------~----~----~----~------~----~------~--~---
On 9/26/06, Caleb <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > > > > Sure enough, I did a search and replace for tabs and replaced them with > spaces. Is this a difference in the way Linux and Windows encode/read > tab characters? If it isn''t an encoding issue then this seems like a > ruby bug (since it works in one environment and not the other).To be honest, I don''t know if it''s a difference with Linux since I don''t use it. This was something that was pointed out to me, and I havn''t really seen the need to undestand why it can''t use tabs it up to this point. I just set my editor to use spaces instead of tabs and away I go. Sorry I can''t be any more help to understanding why... --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Caleb wrote:> Sure enough, I did a search and replace for tabs and replaced them with > spaces. Is this a difference in the way Linux and Windows encode/read > tab characters? If it isn''t an encoding issue then this seems like a > ruby bug (since it works in one environment and not the other).Any chance you''re using RMagick or Ferret? These have been known to cause Erb problems on Windows - specifically errors in your .rhtml files claiming that you have invalid characters in your file. I believe RMagick was just updated to fix this problem, but I don''t know about Ferret. Jeff softiesonrails.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 -~----------~----~----~----~------~----~------~--~---
On 9/26/06, Jeff <cohen.jeff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Caleb wrote: > > Sure enough, I did a search and replace for tabs and replaced them with > > spaces. Is this a difference in the way Linux and Windows encode/read > > tab characters? If it isn''t an encoding issue then this seems like a > > ruby bug (since it works in one environment and not the other). > > Any chance you''re using RMagick or Ferret? These have been known to > cause Erb problems on Windows - specifically errors in your .rhtml > files claiming that you have invalid characters in your file. I > believe RMagick was just updated to fix this problem, but I don''t know > about Ferret. > > Jeff > softiesonrails.com >Unless I''m wrong (and I hope I am) the only fix applied to RMagick was to compile it against Ruby 1.8.4-20 stable. Ferret is already compile against this version so if using either of the two libraries you should be using version 1.8.4-20 of One-Click Ruby. Details of the problem are here; http://rubyforge.org/tracker/index.php?func=detail&aid=3837&group_id=12&atid=133 Cheers, Dave --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Jeff Cohen wrote:> Any chance you''re using RMagick or Ferret? These have been known to > cause Erb problems on Windows - specifically errors in your .rhtml > files claiming that you have invalid characters in your file. I > believe RMagick was just updated to fix this problem, but I don''t know > about Ferret.Ya, I''m using the Ferret plugin. I''ll take a look at that. -- 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-/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 -~----------~----~----~----~------~----~------~--~---