Open2

rails db:create でエラー

bassarbassar

PostgreSQL のバージョンアップ(14=>16)後にエラー。

$ rails db:create                       
rails aborted!
LoadError: dlopen(/Users/bassar/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/pg-1.4.5/lib/pg_ext.bundle, 0x0009): Library not loaded: /opt/homebrew/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib
  Referenced from: <004288CB-0B57-3F69-B14F-274EBA360EC4> /Users/bassar/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/pg-1.4.5/lib/pg_ext.bundle
  Reason: tried: '/opt/homebrew/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib' (no such file), '/opt/homebrew/opt/postgresql@14/lib/postgresql@14/libpq.5.dylib' (no such file), '/usr/local/lib/libpq.5.dylib' (no such file), '/usr/lib/libpq.5.dylib' (no such file, not in dyld cache) - /Users/bassar/.rbenv/versions/3.1.1/lib/ruby/gems/3.1.0/gems/pg-1.4.5/lib/pg_ext.bundle
/Users/bassar/dev/github.com/TsubasaYoshida/satsuroku-v2/config/application.rb:19:in `<main>'
/Users/bassar/dev/github.com/TsubasaYoshida/satsuroku-v2/Rakefile:4:in `require_relative'
/Users/bassar/dev/github.com/TsubasaYoshida/satsuroku-v2/Rakefile:4:in `<main>'
bin/rails:4:in `<main>'
(See full trace by running task with --trace)