title: How to debug using rails console and puts in application
body: <p>I want to get some lines printed in irb opened through rails console. I have seen a lot of SO questions of how to achieve it. But I get nothing in the irb.</p>
  
  <p>below is the code-- </p>
  
  <pre><code>def show
  puts 'in show method'
  @post = Feed.find_by_id params[:id]
  puts @post.inspect
  redirect_to root_path unless @post.present? 
  end
  </code></pre>
  
  <p>now I have opened server by command <code>rails server</code>. Also, In another terminal I gave the command <code>rails console</code>, it opened the irb prompt. when in browser I run <code>localhost:3000/posts/82</code> it gives the correct post, but nothing is shown in the console. What step am I missing? I want to print something in the console when a particular method is called.</p>