Sitemap
Ken Sanchez

Ken Sanchez

Backend Web Developer / Tech Writter / Mexican Engineer

ActiveRecord::ConnectionNotEstablished PostgreSQL + Rails + M1 Error

Sep 5, 2023
Press enter or click to view image in full size
Photo by Nam Anh on Unsplash

I recently ran into an error when updating my Macbook pro m1 pro using Macos Ventura.

The horrible error message:

Press enter or click to view image in full size

As for today September 2023, I updated my computer with brew update and the other commands. This changed my configuration files on which now, on my usual file system, opt/homebrew/var/postgresql I wasn’t seeing my postgresql@14 directory. Still when running psql -V I was seeing psql (Postgresql) 14.9 (Homebrew).

Get Ken Sanchez’s stories in your inbox

Join Medium for free to get updates from this writer.

Ok, so I got the right version, how do I make it work?

Well it turns out that the file path opt/homebrew/var/postgresql is fine, and the version is fine. So in order to make this work I just had to run the following command: pg_ctl -D /opt/homebrew/var/postgres start

And voila! it worked.

I hope this helps you!

--

--

Ken Sanchez
Ken Sanchez

Written by Ken Sanchez

Backend Web Developer / Tech Writter / Mexican Engineer