在Mac M2上安装pg gem的步骤是使用命令`gem install pg:1.5.9 -- --with-pg-config=$(brew --prefix)/opt/libpq/bin/pg_config`。
完成下面两步后,将自动完成登录并继续当前操作。