title: Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension ubuntu
body: <p>While running bundle install i am getting the following error in 'pg' gem i changed the gem as sqlite then too am getting same error. This is my error message.</p>
  
  <pre><code>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:2:in `&lt;main&gt;'
  
  
  Gem files will remain installed in /var/lib/gems/1.9.1/gems/pg-0.16.0 for inspection.
  Results logged to /var/lib/gems/1.9.1/gems/pg-0.16.0/ext/gem_make.out
  
  An error occurred while installing pg (0.16.0), and Bundler cannot continue.
  Make sure that `gem install pg -v '0.16.0'` succeeds before bundling.
  </code></pre>
  
  <p>I tried <code>apt-get install libpg-dev</code> <code>gem install pg -v '0.16.0'</code> nothing helps me</p>