title: How do I generate a random number in a certain range with Ruby?
body: <p>I am trying to get a random year between 1900 and 1980 with Ruby.</p>
  
  <p>So far I have:</p>
  
  <pre><code>puts 'the year was: ' +  1900.to_s + rand(1980).to_s
  </code></pre>
  
  <p>but this is just adding 1900 and a random number from 0 - 1979 together to look like 19001947.</p>
  
  <p>I think I'm missing something silly but can anyone shed any light?</p>