Can't install pg gem on Mountain Lion

前端 未结 4 1003
隐瞒了意图╮
隐瞒了意图╮ 2020-12-01 13:07

I have been having a lot of troubles with Rails after upgrading to Mountain Lion.

Trying to trouble shoot these and searching for hours on the internet so far I have

4条回答
  •  日久生厌
    2020-12-01 13:53

    As banditKing says in his answer, need to tell the gem where to find the postgres binaries. You can use the binaries included with the excellent and easy postgres.app from Heroku ( http://postgresapp.com ) to install this gem instead of the EnterpriseDb version. The EnterpriseDB version is great, but an involved install for a dev machine.

    Download Postgres.app on your system and add the internal bin directory to your path. I put it in /Applications/Postgres.app, so I used

    gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/MacOS/bin/pg_config
    

    worked for me on 10.8.2, Ruby 1.9.3, pg-0.14.1, and the XCode CLI tools

提交回复
热议问题