psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
Same error occurs
$ psql posrgres
... (Omitted) ...
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
brew services restart postgresql@11
Attempts to log in again but fails
rm -rf /usr/local/var/postgres
brew uninstall --force postgresql@11
brew install postgresql@11
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
$sudo mkdir /var/pgsql_socket/
$sudo ln -s /private/tmp/.s.PGSQL.5432 /var/pgsql_socket
dyld: lazy symbol binding failed: Symbol not found: _PQresultMemorySize
Referenced from: /Users/dev/.rvm/gems/ruby-2.5.7/gems/pg-1.2.2/lib/pg_ext.bundle
Expected in: /usr/lib/libpq.5.dylib
dyld: Symbol not found: _PQresultMemorySize
Referenced from: /Users/dev/.rvm/gems/ruby-2.5.7/gems/pg-1.2.2/lib/pg_ext.bundle
Expected in: /usr/lib/libpq.5.dylib
Comment out gem'pg' from the Gemfile and bundle update gem'pg' Uncomment and bundle install
Execute rails db: create → Success
rails db: migrate rails server now also passes
** Solved the problem that DB could not be created with postgresql ** https://haayaaa.hatenablog.com/entry/2019/01/23/111745
** Causes and remedies when you cannot connect to postgresql installed with Homebrew ** https://blog.kyanny.me/entry/2015/01/16/024304
"/var/pgsql_socket/.s.PGSQL.5432"? https://ameblo.jp/soft3133/entry-11466406890.html
Recommended Posts