Mac OSX上pg gem的安装问题

作一个rails应用,说好的用mysql结果后端最后用了postgresql,在mac上配置出了各类问题。 mysql

使用bundle install安装包,发现缺乏pg没法安装,在网上找了一圈解决方案,发现原来我用brew安装PostgresSQL很差解决问题,因而改用直接的发行包。从http://postgresapp.com/上下载应用,直接拖拽安装。 sql

在安装pg gem时使用命令 shell

env ARCHFLAGS="-arch x86_64" gem install pg -- --with-pg-config=/Applications/Postgres93.app/Contents/MacOS/bin/pg_config

注意,若是你应用的名称,原来为Postgres,如今已经更名为Postgres93 后端

再次安装pg gem app

gem install pg

成功 post

相关文章
相关标签/搜索