I\'m attempting to run bundle
in my Rails project on OSX 10.9. It fails when getting to the pg
gem with this error:
Gem::Installer:
this worked for me with Mavericks and the Postgresapp:
gem install pg -v '0.17.0' -- --with-pg-config=/Applications/Postgres93.app/Contents/MacOS/bin/pg_config
For me using Mavericks, Rails 3.2.13, Ruby 2.0.0-p247, PostgreSQL 9.1, I needed todo this:
gem install pg -v '0.15.1' -- --with-pg-config=/Library/PostgreSQL/9.1/bin/pg_config
For me it worked when I did:
brew install postgresql
This worked for me on Mac OS X 10.9.3 and Postgres.app version 9.3.4.2:
1) Install Postgres.app
2) bundle config build.pg --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config
3) gem install pg -v '0.17.1'
4) bundle install
Try using the --with-pg-config
argument:
bundle config build.pg --with-pg-config=/usr/pgsql-9.1/bin/pg_config
To show the path of the pg_config
:
which pg_config
For Ubuntu users:
sudo apt-get install postgresql
sudo apt-get install libpq-dev
Then:
bundle install
Also make sure that you've upgraded Xcode to re-install command line tools on Mavericks. In terminal type:
xcode-select --install
Then follow the prompts.