Ruby on Railsで開発をしています。
今までbundle installでgemを管理して開発をしてきたのですが、
複数のアプリ開発を並行してやることになったので、
ネットの記事に従いbundel install --path vendor/bundleに切り替えたところ、
pgのインストールから先に進めなくなってしまいました。
sh
1$ bundle install --path vendor/bundle 2Fetching gem metadata from https://rubygems.org/......... 3 4(省略) 5 6Fetching pg 1.0.0 7Installing pg 1.0.0 with native extensions 8Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 9 10 current directory: /Users/kazuki/Documents/GitHub/twigroup/vendor/bundle/ruby/2.3.0/gems/pg-1.0.0/ext 11/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20180315-1116-1db18qu.rb extconf.rb --with-pg-config=usr/local/Cellar/postgresql/10.1/bin/pg_config 12Using config values from usr/local/Cellar/postgresql/10.1/bin/pg_config 13sh: usr/local/Cellar/postgresql/10.1/bin/pg_config: No such file or directory 14sh: usr/local/Cellar/postgresql/10.1/bin/pg_config: No such file or directory 15checking for libpq-fe.h... yes 16checking for libpq/libpq-fs.h... yes 17checking for pg_config_manual.h... yes 18checking for PQconnectdb() in -lpq... no 19checking for PQconnectdb() in -llibpq... no 20checking for PQconnectdb() in -lms/libpq... no 21Can't find the PostgreSQL client library (libpq) 22*** extconf.rb failed *** 23Could not create Makefile due to some reason, probably lack of necessary 24libraries and/or headers. Check the mkmf.log file for more details. You may 25need configuration options.
usr/local/Cellar/postgresql/10.1/bin/pg_configが存在しないよ、と怒られるのですが、
実際には存在しているようです。
sh
1$ ag / -g pg_config 2/usr/local/Cellar/postgresql/10.1/bin/pg_config
以前、bundle installでインストールした時も同じエラーに阻まれ、
ネットの記事を頼りにllibpq等をインストールしたことで解決したような記憶があるのですが、詳細を覚えていません。
llibpqをvendor/bundle内にインストールしなければいけないのかな?とも思うのですが、具体的なやり方が分借りませんでした。
どうやったらpgのエラーを起こさずにbundle install --path vendor/bundleができるのでしょうか?
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。