LoginSignup
0
0

More than 1 year has passed since last update.

gem pg が入らない時の手順

Last updated at Posted at 2022-12-23

エラーメッセージ
extconf.rb:40:in popen': Permission denied - /usr/local/Cellar/libpq/15.1 (Errno::EACCES) from extconf.rb:40:in '

1.rbenvを再インストール
% rbenv uninstall 3.0.2
% RUBY_CFLAGS="-Wno-error=implicit-function-declaration" arch -x86_64 rbenv install 3.0.2

2.gemを削除,Gemfile.lockを削除
% sudo rm -rf vendor/bundle
Gemfile.lockを削除

3.bundleインストール
% bundle config build.pg --with-pg-config=/usr/local/Cellar/postgresql@14/14.6/bin/pg_config
=>config=の後はpg_configのフルパスを書く

% bundle config build.pg --with-pg-config=/opt/homebrew/Cellar/libpq/14.5/bin/pg_config
% bundle install

0
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
0
0