我一直在尝试使用gem install pg
安装pg gem,并向我显示错误。
然后我尝试brew install postgresql
,最后显示错误说明use / local / bin已经出现了。如果我在app文件夹中直接运行bundle install
,则会显示安装pg 0.18.4的错误,声明权限被拒绝@ rb_sysopen。
我得到的错误:
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
我该怎么做,有什么建议!