2

Recently I am seeing tests using Rails 3 intermittently fail with the following error:

Failure/Error: visit some_path
ActionView::Template::Error:
  Could not concatenate to the buffer because it is not html safe.

The failures appears to be non-deterministic.

Can anyone suggest what could be causing it?

davetapley
  • 17,000
  • 12
  • 60
  • 86

1 Answers1

0

the view file on some_path has a field which is returning a field which is using <%= %>instead of <%=h %> ?

TomDunning
  • 4,829
  • 1
  • 26
  • 33
  • I don't believe that will solve the problem in, because `h` is included implicitly in Rails 3 (which I apologize for neglecting to mention, question updated), unless I am mistaken, as per: http://stackoverflow.com/a/4699531/21115 – davetapley Apr 25 '12 at 17:02
  • ah ok, sorry i had to guess at a version. all i can think at this point is that the buffer is reaching a limit which is ending in a bad way, if the file it's trying to buffer particularly large or something? – TomDunning Apr 26 '12 at 14:59
  • No, there is nothing atypical about the views which are causing this, indeed it is being emitted on a variety of views which have nothing (apparently) in common. – davetapley May 02 '12 at 17:56