title: Unable to install Rails. Getting Error message.
body: <p>Ubuntu is such a pain sometimes. I am trying to install a specific version of rails (4.2.2) for the Rails tutorial I am doing and my commandline is screaming this code at me in response. Could someone point me in the right direction? Thank you. </p>
  
  <p>I first put...</p>
  
  <p><code>sudo gem install rails -v 4.2.2</code> </p>
  
  <p>and then I get this big ugly thing...   </p>
  
  <pre><code>Building native extensions.  This could take a while...
  ERROR:  Error installing rails:
  ERROR: Failed to build gem native extension.
  
  /usr/bin/ruby1.9.1 extconf.rb
  /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
  from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
  from extconf.rb:1:in `&lt;main&gt;'
  
  
  Gem files will remain installed in /var/lib/gems/1.9.1/gems/json-1.8.3 for inspection.
  Results logged to /var/lib/gems/1.9.1/gems/json-1.8.3/ext/json/ext/generator/gem_make.out
  </code></pre>