title: syntax error, unexpected keyword_ensure, expecting end-of-input in line 61 - haml
body: <p>I am working in the following code. It is from the project 8agentball available in github (<a href="https://github.com/thinkpixellab/agent8ball" rel="nofollow">https://github.com/thinkpixellab/agent8ball</a>). </p>
  
  <p>I am a beginner in Ruby and Rails(started learning today), and I get an error when I try to execute it. I searched in the internet for over 4 hours and did not find anything.</p>
  
  <pre><code>- uncompiled = Rails.env == 'development' &amp;&amp; params.has_key?('uncompiled')
  - content_for :header do
    = game_js(uncompiled)
      %link{:rel =&gt; 'canonical', :href =&gt; 'http://agent8ball.com'}
      %a#fork_me{:href =&gt; "https://github.com/thinkpixellab/agent8ball"}
      %img{:alt =&gt; "Fork me on GitHub", :src =&gt; "http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"}
  
  - if Rails.env == 'development'
    - if(uncompiled)
      = link_to "Uncompiled", root_path, :id =&gt; 'debug', :title =&gt; 'Go to compiled version'
    - else
      = link_to "Compiled", '/?uncompiled', :id =&gt; 'debug', :title =&gt; 'Go to uncompiled version'
  </code></pre>
  
  <p>And I get this error: </p>
  
  <blockquote>
    <p>Showing
    /Users/user/Documents/61/v4/agent8ball-master/app/views/main/index.haml
    where line #xx raised:</p>
  
  <pre><code>/Users/user/Documents/61/v4/agent8ball-master/app/views/main/index.haml:xx: syntax error, unexpected keyword_ensure, expecting end-of-input
  </code></pre>
  </blockquote>
  
  <p>I tried indenting code, tried putting - end after if/else and/or do but to no use.</p>
  
  <p>Any idea? </p>
  
  <p>Thank you</p>