title: How can I print each element of an array on its own line in the Rails console?
body: <p>When I run the Rails console, how can I display each item on its own line? Instead of</p>
  
  <pre><code>&gt; Post.all
  =&gt; #&lt;ActiveRecord::Relation [#&lt;Post id: 1, title: "Post #0", comment: nil, link: "http://yahoo.com", user_id: 1, created_at: "2013-09-30 02:29:28", updated_at: "2013-09-30 02:29:28"&gt;, #&lt;Post id: 2, title: "Post #1", comment: nil,...
  </code></pre>
  
  <p>it would display as</p>
  
  <pre><code>&gt; Post.all
  =&gt; #&lt;ActiveRecord::Relation [
  #&lt;Post id: 1, title: "Post #0", comment: nil, link: "http://yahoo.com", user_id: 1, created_at: "2013-09-30 02:29:28", updated_at: "2013-09-30 02:29:28"&gt;, 
  #&lt;Post id: 2, title: "Post #1", comment: nil,...
  </code></pre>
  
  <p>Similar to <code>x</code> in Perl debugger. I tried</p>
  
  <blockquote>
    <p>Post.all.each{|e| e.inspect + "\n"}</p>
  </blockquote>
  
  <p>But that only made it worse, and wasn't very convenient.</p>
  
  <p>I saw <a href="https://stackoverflow.com/questions/6597359/ruby-on-rails-pretty-print-for-variable-hash-set-inspect-is-there-a-way-to#6597570">Ruby on Rails: pretty print for variable.hash_set.inspect ... is there a way to pretty print .inpsect in the console?</a> and <a href="https://github.com/michaeldv/awesome_print" rel="noreferrer">https://github.com/michaeldv/awesome_print</a></p>
  
  <p>but that doesn't seem to work</p>
  
  <pre><code>irb(main):005:0&gt; require "awesome_print"
  =&gt; false
  irb(main):006:0&gt; ap Post.all
  #&lt;ActiveRecord::Relation [#&lt;Post id: 1, title: "Post #0",
  </code></pre>