title: Error installing nokogiri in ubuntu 14.0.4 (Ruby 1.8.7)
body: <p>I'm trying to install the bundle(bundle install) in Ubuntu 14.0.4 installed Ruby 1.8.7.And it fails to install the bundle and displayed the error: </p>
  
  <pre><code>An error occurred while installing nokogiri (1.4.7), and Bundler cannot
  continue. Make sure that `gem install nokogiri -v '1.4.7'` succeeds before bundling.
  </code></pre>
  
  <p>so now I tried to get the nokogiri 1.4.7 with but it got failed showed </p>
  
  <pre><code>$ sudo gem install nokogiri -v '1.4.7'
  ERROR:  Error installing nokogiri:
      ERROR: Failed to build gem native extension.
  libxml2 is missing.  please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
  </code></pre>
  
  <p>so again I tried to get this libxml2, but end up with the below message:</p>
  
  <pre><code>$ sudo gem install libxml2
  ERROR:  Could not find a valid gem 'libxml2' (&gt;= 0) in any repository
  ERROR:  Possible alternatives: libxml4r
  
  
  $ sudo gem install libxml4r
  ERROR:  Error installing libxml4r
  extconf failure: need libxml2.
  </code></pre>
  
  <p>I tried with the <a href="http://www.nokogiri.org/tutorials/installing_nokogiri.html" rel="noreferrer">reference</a>:</p>
  
  <pre><code>$ gem install nokogiri -- --use-system-libraries
  $ bundle install
  </code></pre>
  
  <p>but still the same nokogiri error coming again. Don't have a clue how to continue. please help me!!!!</p>