unable to install pg gem

后端 未结 20 875
不知归路
不知归路 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:01

    I had to do this on CentOS 5.8. Running bundle install kept causing issues since I couldn't force it to use a particular PG version.

    I can't yum erase postgresql postgresql-devel either, because of dependency issues (it would remove php, http etc)

    The solution? Mess $PATH temporarily to give preference to the update pgsql instead of the default one:

    export PATH=/usr/pgsql-9.2/bin:$PATH
    bundle install
    

    Basically, with the above commands, it will look at /usr/pgsql-9.2/bin/pg_config before the one in /usr/bin/pg_config

提交回复
热议问题