gem install pg for ruby on rails

前端 未结 1 1253
别那么骄傲
别那么骄傲 2021-02-15 00:12

Postgresql will not install on OSX here is my data below

n error occurred while installing pg (0.18.4), and Bundler cannot continue. Make sure that gem ins

相关标签:
1条回答
  • 2021-02-15 00:53

    This basically means that you're missing a library or program on your setup. I've had this issue a couple of times now so here are a few different things to try (hopefully one of them will work for you):

    Install a common missing library:

    brew install libpqxx
    gem install pg
    

    Reinstall postgres (not ideal I know):

    brew uninstall postgresql
    brew install postgresql
    gem install pg
    

    Explicitly define path of pg_config:

    1) Get location of pg_config

    which pg_config
    

    2) pass that path into gem install

    gem install pg --with-pg-config=/usr/pgsql-9.1/bin/pg_config
    
    0 讨论(0)
提交回复
热议问题