I am on El Capitan 10.11.6 and using bash. ruby 2.3.0 rails 5.0.0
I have been learning ruby/rails and would like to push an app up to heroku. I have followed the steps outlined by the heroku documentation and Postgres.app documentation.
I downloaded Postgres.app and moved it to the Applications directory.
I placed this in my ~/.bash_profile
export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/9.5/bin
Yet when I type in $ which psql
I get no info at all. Also, $ psql -h loclhost
does nothing. I can however, "start" Postgres.app by double clicking on the icon, and I get the elephant in the menu bar.
Furthermore, I can not install gem 'pg'
. I get the error:
Installing pg 0.18.4 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/jesselawson/.rvm/gems/ruby-2.3.0/gems/pg- 0.18.4/ext
/Users/jesselawson/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160821-1410-1o4aen1.rb 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 ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.
and
An error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that gem install pg -v '0.18.4' succeeds before bundling.