title: Reading multiple lines at time from a file
body: <p>How can I read multiple lines at a time from a file in Ruby?</p>
  
  <p>I tried using <code>each_slice(2)</code> and also did: <code>require 'enumerator'</code>, but it doesn't work. I get the following error:</p>
  
  <pre class="lang-none prettyprint-override"><code>undefined method `each_slice' for #&lt;String:0x877d12c&gt; (NoMethodError)
  </code></pre>