Take the 2-minute tour ×

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

Failure/Error: visit some_path
  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?

share|improve this question
I'm seeing a similar issue - in production - Did you find the cause of this problem? –  Bert Goethals Oct 31 '13 at 8:29
I'm afraid we never got anywhere, and I've since left the project :( –  dukedave Oct 31 '13 at 14:29
add comment

1 Answer

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

share|improve this answer
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: stackoverflow.com/a/4699531/21115 –  dukedave 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? –  Isotope 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. –  dukedave May 2 '12 at 17:56
add comment

Your Answer


