I have been trying to install pg gem using, gem install pg
, and its showing me an error.
Then I tried brew install postgresql
, which, in the end showed error stating use/local/bin already exixts. If I am directly running bundle install
in the app folder, its showing the error on installing pg 0.18.4, stating permission denied @ rb_sysopen.
The errors that I am getting:
Amans-MacBook-Air:~ aman$ gem install pg
ERROR: While executing gem ... (Errno::EACCES)
Permission denied @ rb_sysopen - /Users/aman/.rbenv/versions/2.3.0/lib/ruby/gems/2.3.0/gems/pg-0.18.4/.gemtest
Amans-MacBook-Air:~ aman$ brew install postgresql
Warning: postgresql-9.5.3 already installed, it's just not linked
Amans-MacBook-Air:~ aman$ brew link postgresql
Linking /usr/local/Cellar/postgresql/9.5.3... Error: File exists - /usr/local/lib
What should I do, any suggestions!