I'm trying to locally start my rails server
but do I have to start my postgresql db each time I want to rails s?
I'm new to rails so I'm not sure how this works. I remember not having to do such a thing on something I've worked on before..
As mentioned in other answers you have to make sure that Postgres is runnign and serving your database. This is not handled by Rails.
Usually you would configure the Postgres server as an OS background service that starts with your system. Which operating system do you use? In case it's MacOS and you're already using Homebrew, I'd recommend using Hombrew services. You can read more about it here: https://github.com/Homebrew/homebrew-services
Basically you'd tell Homebrew to start postgres with your system, like this: brew services start postgres
rails servercommand and Postgres service are not related whatsoever, but you'll need to have Postgres running if you want to use the DB from Rails, of course. You should have Postgres service start automatically with your OS.