找不到rails pg_config路径

时间:2016-05-11 11:50:49

标签: ruby-on-rails macos postgresql

我通过postgresql图形安装程序(http://www.postgresql.org/download/macosx/)在我的macbook上安装了postgresql。现在我想在我的rails项目中配置pg,但我不知道在哪里可以找到pg_conf路径。

bundle config build.pg --with-pg-config=<path to pg_config>

1 个答案:

答案 0 :(得分:-1)

只需在gemfile中添加gem 'pg'即可。让bundle install做神奇的

<强>更新 可能这也会有所帮助。 gem install pg --with-pg-config works, bundle fails

如果您只想要pg_config路径,请在终端中尝试which pg_config。它会给你它的路径。