sqlite3 を使用して Rails アプリを開発しています。Herokuにプッシュしたい。Heroku チュートリアルでは、最初に変更する必要があると書かれています。
gem 'sqlite3'
に
gem 'pg'
そして走る
bundle install
このエラーが発生しました:
Installing pg (0.14.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
...
Can't find the PostgreSQL client library (libpq)
*** 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.
...
次に、ここで提案されたソリューションを試しました:
running gem install pg -- --with-pg-config= /usr/bin/pg_config
私も実行してみました:
sudo apt-get install postgresql
sudo apt-get install libpq-dev
と
gem install pg
正常に動作します..
しかし
bundle install
それでも同じエラーが発生します
注:rvmを使用しています