I'm developing a rails app using sqlite3. I want to push it to Heroku. In Heroku tutorial it says that I have to first change:
gem 'sqlite3'
to
gem 'pg'
and run
bundle install
I got this error:
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.
...
next I tried the solution proposed here:
running gem install pg -- --with-pg-config= /usr/bin/pg_config
I also tried running:
sudo apt-get install postgresql
sudo apt-get install libpq-dev
and
gem install pg
works fine..
But
bundle install
still gives me the same error
Note: I'm using rvm