Opsi 1:
Tambahkan pg
ke Gemfile
. Anda tapi lewati mencoba menginstalnya secara lokal.
$ cat Gemfile
...
group :production do
# gems specifically for Heroku go here
gem "pg"
end
# Skip attempting to install the pg gem
$ bundle install --without production
Opsi 2 (Debian/Ubuntu):
Tambahkan pg
ke Gemfile
. Anda tapi instal dulu prasyaratnya.
$ cat Gemfile
...
group :production do
# gems specifically for Heroku go here
gem "pg"
end
# Install the pg gem's dependencies first
$ sudo apt-get install libpq-dev
# Then install the pg gem along with all the other gems
$ bundle install