I have been trying to run bundle install and I get the following error:
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/fr/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Upon following the instructions, I received the following error:
gem install pg -v '0.17.0' ⏎
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/fr/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
I followed the instructions provided in a similar issue reported earlier. Please see Installing PG gem - failure to build native extension
But this has not helped as shown below:
brew install postgresql
Warning: Could not link postgresql. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link postgresql'
Possible conflicting files are:
==> /usr/local/Cellar/postgresql/9.3.4/bin/initdb /usr/local/var/postgres
==> Summary
/usr/local/Cellar/postgresql/9.3.4: 2928 files, 38M
brew link postgresql
Linking /usr/local/Cellar/postgresql/9.3.4...
Warning: Could not link postgresql. Unlinking...
Error: Could not symlink file: /usr/local/Cellar/postgresql/9.3.4/share/man/man7/WITH.7
/usr/local/share/man/man7 is not writable. You should change its permissions.
My two concerns are:
- How can I fix the issue related to the 'pg' gem?
- To fix this issue, is it necessary to modify the read-write permissions of the files mentioned for the brew link postgresql output?