On the latest version of Linux Mint 12 (the Linux platform I prefer for Ruby development) I ran a bundle install on a small application using Sqlite3 and ran into the following error message. After a little Google search I found that my installing Sqlite3 did not give Gem all the build files it requires to build the Sqlite3-ruby gem with native extensions. So if you are running into the same issue make sure you run the following commands prior to running bundle install.
sudo apt-get install sqlite3
sudo apt-get install libsqlite3-dev
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
checking for sqlite3.h… no
sqlite3.h is missing. Try ‘port install sqlite3 +universal’
or ‘yum install sqlite-devel’ and check your shared library search path (the
location where your sqlite3 shared library is located).
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
Gem files will remain installed in /home/tim/.rvm/gems/ruby-1.9.2-p290@CorDev1.9.2/gems/sqlite3-1.3.6 for inspection.
Results logged to /home/tim/.rvm/gems/ruby-1.9.2-p290@CorDev1.9.2/gems/sqlite3-1.3.6/ext/sqlite3/gem_make.out