I have tried all methods listed on other pg topics such as this one and this. All this time I have been able to get away by running bundle install --without production
. However, this time I need to use a gem that requires pg gem. I need to actually install pg to my machine (OSX El Capitan 10.11.5)
I feel like my best bet is to use suggestion on this post to use postgres.app. I have tried:
I recommend that you try to use Postgres.app. (http://postgresapp.com) This way you can easily turn Postgres on and off on your Mac. Once you do, add the path to Postgres to your .profile file by appending the following:
PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
and also tried configuring my path on .bash-profile as said here, but none work.
Another problem I am seeing is, whenever I type command which_psql
(edit: which psql
)it returns nothing (nothing happens) - is that supposed to happen?
I have tried:
Having on my .bash_profile
: export PATH=$PATH:/Applications/Postgres.app/Contents/Versions/latest/bin
and then run gem install pg
Type this on .profile
PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
and then run gem install pg.
Did I do anything wrong? I notice that postgres.app can be turned on and off. I have had it on the whole time. Do I have to turn it on before running gem install pg? What is the proper way to install pg
gem using postgres.app, step by step?