 <p>Not sure if it's causing the problem, but <code>head</code> and <code>body</code> should be inside the <code>html</code> tag.</p> <pre><code>!!! = surround '&lt;!--[if !IE]&gt; --&gt;'.html_safe, '&lt;!-- &lt;![endif]--&gt;'.html_safe do %html.no-js{:lang =&gt; 'en'} %head %body </code></pre> <p>Could be confusing the <code>surround</code> method by having multiple tags appended instead of nested... Worth a try!</p>