I have difficulty trying to gem install pg -v '0.18.4' that is needed for my ruby on rails "bundle install" app which was developed about 3 years back.
sudo gem install pg -v '0.18.4'
it complaints below:
conftest.c:15:13: error: conflicting types for 'PQconnectdb'
extern void PQconnectdb();
full execution error https://gist.github.com/axilaris/f521685f4e5c7a8e5653bf672af1efa7
mkmf.log - https://gist.github.com/axilaris/2e4cf2729b34d751c1ce76b046a0b21c
My environment is as below:
Postgres 9.4.0.1
MacOs Sierra High 10.13.1
$ ruby -v
ruby 2.3.3p222 (2016-11-21 revision 56859) [universal.x86_64-darwin17]
$ rails -v
Rails 5.1.4
I tried to install brew install libpqxx it doesnt work
Here are some related stackoverflow:
Can't find the 'libpq-fe.h header when trying to install pg gem
Impossible to Install PG gem on my mac with Mavericks
I want to make sure I install - sudo gem install pg -v '0.18.4'. Since on production it should be running that as well. I dont want to break anything that is running in the production ubuntu server. Currently for this question, I am setting up the environment on my mac for development to try to make a code fix.
FYI, I'ved tried on 2 macs. one original development mac which upgraded to sierra high, another is a new formatted mac with newly installed sierra high.