title: Why does `gem install rails` fail?
body: <p>As a background, here's my environment:</p>
  
  <pre><code>vishal@dishDell:~$ gem env
  RubyGems Environment:
    - RUBYGEMS VERSION: 1.8.24
    - RUBY VERSION: 1.9.3 (2011-10-30 patchlevel 0) [x86_64-linux]
    - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.9.1
    - RUBY EXECUTABLE: /usr/bin/ruby1.9.1
    - EXECUTABLE DIRECTORY: /usr/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - x86_64-linux
    - GEM PATHS:
       - /usr/lib/ruby/gems/1.9.1
       - /home/vishal/.gem/ruby/1.9.1
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :benchmark =&gt; false
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
    - REMOTE SOURCES:
       - http://rubygems.org/
  </code></pre>
  
  <p>This is what happens when I try running <code>gem install rails</code>.</p>
  
  <pre><code>vishal@dishDell:~$ sudo gem install rails
  [sudo] password for vishal: 
  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/local/lib/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- mkmf (LoadError)
      from /usr/local/lib/site_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 /usr/lib/ruby/gems/1.9.1/gems/json-1.7.3 for inspection.
  Results logged to /usr/lib/ruby/gems/1.9.1/gems/json-1.7.3/ext/json/ext/parser/gem_make.out
  </code></pre>
  
  <p>I installed Ruby 1.9.3 using <code>apt-get</code>, and I installed RubyGems from a tarball at rubygems.org. What should I do to get this to work?</p>