bundle install で エラーが起きたとき…

More than 3 years have passed since last update.

bundle install

Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle
as root will break this application for all non-root users on this machine.
Fetching gem metadata from
Fetching additional metadata from
Resolving dependencies...
Installing i18n 0.6.11
Using json 1.8.1
Installing minitest 5.4.0
Installing thread_safe 0.3.4
Installing tzinfo 1.2.2
Installing activesupport 4.1.4
Installing builder 3.2.2
Installing activemodel 4.1.4
Installing arel
Installing activerecord 4.1.4
Using coderay 1.1.0
Using method_source 0.8.2
Using slop 3.6.0
Using pry 0.10.0
Using rack 1.5.2
Using rack-protection 1.5.3
Using tilt 1.4.1
Using sinatra 1.4.5

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/usr/local/rbenv/versions/2.1.2/bin/ruby extconf.rb
checking for sqlite3.h... no
sqlite3.h is missing. Try 'port install sqlite3 +universal',
'yum install sqlite-devel' or 'apt-get install libsqlite3-dev'
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:

extconf failed, exit code 1

Gem files will remain installed in /usr/local/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/sqlite3-1.3.9 for inspection.
Results logged to /usr/local/rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/extensions/x86_64-linux/2.1.0-static/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.

cd /usr/bin 

ls | grep sqlite




yum install sqlite-devel


gem install sqlite3