LoginSignup
1
0

More than 5 years have passed since last update.

Mac/PostgreSQL gemのインストール

Last updated at Posted at 2015-09-29

PostgreSQLをdmgでインストールした時に、gemでPostgreSQLのライブラリを
インストーしようと思ったら、以下のエラーがでた。

>gem install pg
No pg_config... trying anyway. If building fails, please try again with
 --with-pg-config=/path/to/pg_config

pg_configが見つからないらしい。
「--with-pg-config=/path/to/pg_config」とあるので、試してみる。

>gem install pg --with-pg-config=/Library/PostgreSQL/9.3/bin/pg_config
ERROR:  While executing gem ... (OptionParser::InvalidOption)
    invalid option: --with-pg-config=/Library/PostgreSQL/9.3/bin/pg_config

今度は、InvalidOptionとなる。
色々と調べた結果sourceからビルドした場合は、上記で上手くいくらしい。

けど、私は、dmgでインストールしたんです。
で、最終的な結果は、以下でいけました。

gem install pg -- --with-pg-config=/Library/PostgreSQL/9.3/bin/pg_config
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0