pg gem '0.14.0' on Mountain Lion fails

后端 未结 10 1900
孤街浪徒
孤街浪徒 2020-12-10 12:56

I just upgraded from OS X Lion to OS X Mountain Lion. My rails environment for the most part stayed in tact.

The only steps I had to do to get things back to a good

10条回答
  •  温柔的废话
    2020-12-10 13:03

    Reinstalling ruby fixed a similar issue I was having after upgrading to Mountain Lion

    rvm reinstall 1.9.3
    

    Note: also run the following as it seems the default version resets

    rvm --default 1.9.3
    

    For reference I posted the error I was seeing below

    gem install pg
    Building native extensions.  This could take a while...
    ERROR:  Error installing pg:
    ERROR: Failed to build gem native extension.
    
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb --with pg=/usr/local/Cellar/postgresql/9.1.4/bin
    checking for pg_config... yes
    Using config values from /usr/local/bin/pg_config
    checking for libpq-fe.h... no
    Can't find the 'libpq-fe.h header
    *** extconf.rb failed ***
    

提交回复
热议问题