sqlite3 の bundle install が上手くいかなかった時のお話
事象
aws に上げた unicorn のエラーログが常に出力されていた
(気づかずに寝たため、起きた時には大量のログが・・・orz
/home/centos/app/vender/bundle/ruby/2.1.0/gems/activerecord-4.2.5/lib/active_record/connection_adapters/connection_specification.rb:177:in `rescue in spec': Specified 'sqlite3' for database adapter, but the gem is not loaded. Add `gem 'sqlite3'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord). (Gem::LoadError)
sqlite3 がダメって言ってる?
確かに bundle install した時に何かがひっかかっていた記憶が・・・
調査してみたところ、原因が判明。
依存ファイルが問題
sqlite3 は依存ファイルが必要とのこと。
というわけで、yum でインストール
sudo yum install sqlite-devel
そのあと、bundle install で問題なくsqlite3が入ったことを確認。
無事に unicorn から大量のエラーログが出なくなったことを確認できました。
めでたし、めでたし。