Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ruby-on-rails/64.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 未找到rails pg_配置路径_Ruby On Rails_Macos_Postgresql - Fatal编程技术网

Ruby on rails 未找到rails pg_配置路径

Ruby on rails 未找到rails pg_配置路径,ruby-on-rails,macos,postgresql,Ruby On Rails,Macos,Postgresql,我通过postgresql图形安装程序()在macbook上安装了postgresql。现在我想在rails项目中配置pg,但我不知道在哪里可以找到pg_conf path bundle config build.pg --with-pg-config=<path to pg_config> bundle config build.pg——使用pg config= 只需在gem文件中添加gem'pg'。让bundle安装 更新 也许这也会有帮助 另外,如果您只需要pg_config

我通过postgresql图形安装程序()在macbook上安装了postgresql。现在我想在rails项目中配置pg,但我不知道在哪里可以找到pg_conf path

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

只需在gem文件中添加
gem'pg'
。让
bundle安装

更新 也许这也会有帮助


另外,如果您只需要
pg_config
路径,请尝试在终端中使用
哪个pg_config
。它将为您提供路径。

您只需在gemfile中添加gem'pg',是的,但当我执行“bundle安装”时,我会收到以下错误:无pg\u配置。。。无论如何都要努力。如果构建失败,请使用--with pg config=/path/to/pg_config重试我有一个带有OSXdid的macbook air,您可以尝试brew安装postgresql