title: How to copy paste multiple lines of code into rails console (e.g. copy paste from a script)
body: <p>I discovered from <a href="https://stackoverflow.com/questions/32018602/define-a-class-instancemethod-in-rails-console">here</a> that if you have a script you want to run in the rails console, you sometimes have to copy paste it line by line (copy pasting it all at once doesn't always work)</p>
  
  <p>This is very tedious for lengthy scripts</p>
  
  <p>Is there a work around or faster way? </p>
  
  <p>Example - this will not copy paste from text editor to console:</p>
  
  <pre><code>class Article
      def initialize(title, link, paragraphs)
          @title = title
          @link = link
          @paragraphs = paragraphs 
      end
      attr_reader :title
      attr_reader :link
      attr_reader :paragraphs
  end
  </code></pre>
  
  <p><strong>Edit</strong>
  The above snipped <em>does</em> copy paste right into the rails console. But when I grab the same text from sublime text 3, it errors after the second line, with: 
  Display all 522 possibilities? (y or n)..</p>
  
  <p><strong>The Answer</strong>
  I worked out why. My script (in sublime text) used tabs as indents. The rails console only accepts spaces as indents. That's an hour of my life I won't get back. I hope this saves someone else some time.</p>