gem install pg doesn't work on OSX Lion

后端 未结 13 1051
天命终不由人
天命终不由人 2020-12-07 15:08

There are variations of this question bouncing around SO, but none of them seem to have an answer that solves my problem.

I am running OSX Lion (10.7.3). The latest

13条回答
  •  伪装坚强ぢ
    2020-12-07 15:30

    $ gem install pg
    

    If that failed:

    $ sudo gem install pg
    

    Then, if that failed:

    $ sudo find / -name “pg_config”
    

    After you find pg_config's location, run this to finally install it:

    $ sudo gem install pg --with-pg-config=/usr/local/Cellar/postgresql/9.5.1/bin/pg_config
    

    Of course, you'll want to change the path to wherever you found pg_config.

    Then, check your installed gems with gem list, and it should show something like this:

    <code>gem list</code> showing the right things

    More information can be found in my guide.

提交回复
热议问题