title: Ruby on rails - Error during bundle install
body: <p>I've been googling this error below, but I can't solve this error:</p>
  
  <pre><code>Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  
      /usr/bin/ruby2.1 extconf.rb 
  mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h
  
  extconf failed, exit code 1
  
  Gem files will remain installed in /home/dyego/.bundler/tmp/9200/gems/sqlite3-1.3.9 for inspection.
  Results logged to /home/dyego/.bundler/tmp/9200/extensions/x86_64-linux/2.1.0/sqlite3-1.3.9/gem_make.out
  An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
  Make sure that `gem install sqlite3 -v '1.3.9'` succeeds before bundling.
           run  bundle exec spring binstub --all
  /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:296:in `resolve': Could not find gem 'sqlite3 (&gt;= 0) ruby' in the gems available on this machine. (Bundler::GemNotFound)
      from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:168:in `start'
      from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:129:in `block in resolve'
      from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:128:in `catch'
      from /usr/lib/ruby/vendor_ruby/bundler/resolver.rb:128:in `resolve'
      from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:179:in `resolve'
      from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:114:in `specs'
      from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:159:in `specs_for'
      from /usr/lib/ruby/vendor_ruby/bundler/definition.rb:148:in `requested_specs'
      from /usr/lib/ruby/vendor_ruby/bundler/environment.rb:18:in `requested_specs'
      from /usr/lib/ruby/vendor_ruby/bundler/runtime.rb:13:in `setup'
      from /usr/lib/ruby/vendor_ruby/bundler.rb:120:in `setup'
      from /usr/lib/ruby/vendor_ruby/bundler/setup.rb:17:in `&lt;top (required)&gt;'
      from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  </code></pre>
  
  <p>So I googled this error:</p>
  
  <blockquote>
    <p>mkmf.rb can't find header files for ruby at /usr/lib/ruby/include/ruby.h</p>
  </blockquote>
  
  <p>and I got some similar questions like this one:
  <a href="https://stackoverflow.com/questions/20559255/error-while-installing-json-gem-mkmf-rb-cant-find-header-files-for-ruby">Error while installing json gem &#39;mkmf.rb can&#39;t find header files for ruby&#39;</a></p>
  
  <p>But I already installed ruby-dev:</p>
  
  <pre><code>sudo apt-get install ruby-dev
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  ruby-dev is already the newest version.
  0 upgraded, 0 newly installed, 0 to remove and 72 not upgraded.
  </code></pre>
  
  <p>I'm really struggling to solve this problem (even though it seems to be a simple one).</p>