title: Unable to install gem - Failed to build gem native extension - cannot load such file -- mkmf (LoadError)
body: <p>Ruby 1.9.3</p>
  
  <p>The part of Gemfile</p>
  
  <pre><code>#...............
  gem "pony"
  gem "bcrypt-ruby", :require =&gt; "bcrypt"
  gem "nokogiri" 
  #..................
  </code></pre>
  
  <p>When I'm trying to install gems, I get an error</p>
  
  <pre><code>alex@ubuntu:~/$ bundle
  Fetching gem metadata from http://rubygems.org/.........
  Fetching gem metadata from http://rubygems.org/..
  Enter your password to install the bundled RubyGems to your system: 
  #####............................................................
  Installing bcrypt-ruby (3.0.1) with native extensions 
  Gem::Installer::ExtensionBuildError: 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:36:in `&lt;main&gt;'
  
  
  Gem files will remain installed in /home/alex/.bundler/tmp/5526/gems/bcrypt-ruby-3.0.1 for inspection.
  Results logged to /home/alex/.bundler/tmp/5526/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
  An error occurred while installing bcrypt-ruby (3.0.1), and Bundler cannot continue.
  Make sure that `gem install bcrypt-ruby -v '3.0.1'` succeeds before bundling.
  </code></pre>
  
  <p>Then I'm doing this</p>
  
  <pre><code>sudo gem install bcrypt-ruby -v '3.0.1'
  Building native extensions.  This could take a while...
  ERROR:  Error installing bcrypt-ruby:
          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:36:in `&lt;main&gt;'
  
  
  Gem files will remain installed in /var/lib/gems/1.9.1/gems/bcrypt-ruby-3.0.1 for inspection.
  Results logged to /var/lib/gems/1.9.1/gems/bcrypt-ruby-3.0.1/ext/mri/gem_make.out
  </code></pre>
  
  <p>and getting an error as well.</p>
  
  <p>What did I miss?</p>