Can't install pg gem on Mountain Lion

前端 未结 4 1007
隐瞒了意图╮
隐瞒了意图╮ 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:52

    Download the postgresSQL installer from http://www.enterprisedb.com/products-services-training/pgdownload#osx

    and then make your path look something like this:

    PATH=$PATH:/Library/PostgreSQL/9.0/bin/ gem install pg
    

    This would do!

    Note: Please specify your postgreSQL installed version correctly in the path.

    UPDATE(10/11/2015) (Taken from Heroku)

    On OS X with Homebrew:

    1. Install postgresql using:

      brew install postgresql

    2. Then install the gem using:

      gem install pg -- --with-pg-config=/usr/local/bin/pg_config

    On OS X with MacPorts:

    gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config

    Hope this helps!

提交回复
热议问题