title: Convert slim to ERB
body: <p>I am making my first steps in ruby and I am trying to learn how to use Sinatra. In a relevant book I found this example view written in Slim.</p>
  
  <pre><code>h1 Songs
  a href="/songs/new" Create a new song
  - if @songs.any?
    ul#songs
      -@songs.each do |song|
        li &lt;a href="/songs/#{song.id}"&gt;#{song.title}&lt;/a&gt;
  - else
    p No songs have been created yet!
  </code></pre>
  
  <p>I tried to change it into ERB ending up in something like this</p>
  
  <pre><code>&lt;html&gt;
  &lt;h1&gt; Songs &lt;/h1&gt;
  &lt;a href="/songs/new" Create a new song&gt;&lt;/a&gt;
  &lt;% if @songs.any? %&gt;
      &lt;%#songs%&gt;
      &lt;% @songs.each do |song|%&gt;
          &lt;ul&gt;&lt;li&gt; &lt;a href="/songs/#{song.id}"&gt;&lt;%=#{song.title}%&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
  &lt;% else %&gt;
      &lt;p&gt; No songs have been created yet!&lt;/p&gt;
  &lt;% end %&gt;   
  &lt;/html&gt;
  </code></pre>
  
  <p>Sinatra gave me this report</p>
  
  <pre><code>SyntaxError at /songs
  Documents/programs/sinatra/views/songs.erb:8: syntax error, unexpected keyword_else, expecting ')' ; else ^ 
  Documents/programs/sinatra/views/songs.erb:10: syntax error, unexpected keyword_end, expecting ')' ; end ; @_out_buf.concat "\t\n" ^ 
  Documents/programs/sinatra/views/songs.erb:14: syntax error, unexpected keyword_ensure, expecting ')' 
  Documents/programs/sinatra/views/songs.erb:16: syntax error, unexpected keyword_end, expecting ')'
  </code></pre>
  
  <p>Can you give me a clue of what is going on?
  Thank you in advance.</p>