Ruby on rails 我如何知道在OSX上安装pg gem要使用哪些配置选项?

Ruby on rails 我如何知道在OSX上安装pg gem要使用哪些配置选项?,ruby-on-rails,macos,postgresql,installation,heroku,Ruby On Rails,Macos,Postgresql,Installation,Heroku,我已经通过了Google和Stackoverflow,还没有解决我在Heroku上安装pg gem的问题 我已经通过Macport安装了Postgresql,但也许我安装的路径不对 我这么说是因为当我使用pg config=/user/local/bin/pg_config安装pg--gem时,我得到了以下信息: extconf.rb:24:in ``': No such file or directory - /users/******/postgresql/bin/pg_config --i

我已经通过了Google和Stackoverflow,还没有解决我在Heroku上安装pg gem的问题

我已经通过Macport安装了Postgresql,但也许我安装的路径不对

我这么说是因为当我使用pg config=/user/local/bin/pg_config安装pg--gem时,我得到了以下信息:

extconf.rb:24:in ``': No such file or directory - /users/******/postgresql/bin/pg_config --includedir (Errno::ENOENT)
或者我没有完成完整的安装,因为我一直在得到以下信息:

*** 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.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/Users/TonyNg/.rvm/rubies/ruby-1.9.2-p180/bin/ruby
    --with-pg
    --without-pg
    --with-pg-dir
    --without-pg-dir
    --with-pg-include
    --without-pg-include=${pg-dir}/include
    --with-pg-lib
    --without-pg-lib=${pg-dir}/lib
    --with-pg-config

我应该如何着手解决这个问题呢?

请遵循这个伟大的指南

对lion(10.7)也很有效

我和你以前犯过同样的错误

指南中关于为您自己的shell帐户创建数据库用户的提示将为您节省很多麻烦

希望你进步