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 https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
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 5.0.1.20140414130214
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:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/local/rbenv/versions/2.1.2/bin/ruby
--with-sqlite3-dir
--without-sqlite3-dir
--with-sqlite3-include
--without-sqlite3-include=${sqlite3-dir}/include
--with-sqlite3-lib
--without-sqlite3-lib=${sqlite3-dir}/lib
--enable-local
--disable-local
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
sqlite3
sqlite3がインストールしてあるのにgemでsqliteがインストールするさいにエラーが起きるのはなぜだろうと調べたらどうやら
sqlite-devel
をインストールしていないらしいことがわかったので
yum install sqlite-devel
をインストールしたら
gem install sqlite3
をインストールできました。
gemでのインストール関連はどうやら結構エラーが起きることが多いみたい。