unable to install pg gem

后端 未结 20 871
不知归路
不知归路 2020-12-02 04:54

I tried using gem install pg but it doesn\'t seem to work.

gem install pg gives this error

Temporarily enhancing PATH to in         


        
20条回答
  •  無奈伤痛
    2020-12-02 05:04

    If you are using Postgres.app on Mac, you may resolve this issue once and for all like this:

    First gem uninstall pg, then edit your ~/.bash_profile or ~/.zshrc file or equivalent and add:

    # PostgreSQL bin path
    export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.4/bin
    

    Then bundle install and gem install pg should both work as expected.

提交回复
热议问题