Rails 3.1 – Pushing to Heroku – Errors installing postgres adapter?

Option 1:

Add pg to your Gemfile but skip trying to install it locally.

$ 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

Option 2 (Debian/Ubuntu):

Add pg to your Gemfile but first install the prerequisites.

$ 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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)