Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rails: Update PSQL Install instructions on macOS #29164

Open
3 of 7 tasks
crespire opened this issue Dec 8, 2024 · 3 comments · May be fixed by #29169
Open
3 of 7 tasks

rails: Update PSQL Install instructions on macOS #29164

crespire opened this issue Dec 8, 2024 · 3 comments · May be fixed by #29169

Comments

@crespire
Copy link
Contributor

crespire commented Dec 8, 2024

Checks

Describe your suggestion

Currently, the macOS instructions for installing PSQL involve installing psql dependencies directly via brew. At the time of writing, I didn't have a good sense of the macOS ecosystem and assumed that was the best way to install PSQL and friends.

Now that I've been working with macOS, it seems that there is a better way: https://postgresapp.com/

This install method nets us a few advantages:

  1. PSQL version management - you can install multiple concurrent versions of Postgres and run one at a time, or run different versions on different local ports.
  2. Tooling comes packaged in (psql and friends like pg_dump and pg_restore) without much fuss.

I think it's a much better way to manage PSQL on macOS. The project is open source and licensed under the same license as PSQL itself.

Additionally, I'd like to update the instructions so that we use at least N-1 of the current release (PSQL is officially on V17, but the macOS instructions are on v14).

Path

Ruby / Rails

Lesson Url

https://www.theodinproject.com/lessons/ruby-on-rails-installing-postgresql

(Optional) Discord Name

crespire

(Optional) Additional Comments

Spots to change/impacts:

  • Rails Lesson
  • NodeJS Lesson
  • Rails project setup instructions
  • NodeJS project setup instructions - if we instruct learners to set up a test project to use this local DB, those instructions should also be updated to reflect whatever path we decide here re: local trust auth.
@crespire
Copy link
Contributor Author

crespire commented Dec 9, 2024

Just going through the lesson now to update MacOS to use Postgres.app and I see that Postgres.app sets up a "peer" role with trust authentication, that is to say, no password is required for local connections. This is contrary to the current Linux and macOS instructions where we guide learners to set up a password for their peer-authentication role.

Because this lesson is about setting a local development environment, I feel that using the trust authentication is fine, but I'm mindful that this approach doesn't give learners context on best practices when setting up databases (typically, in a production env, you want at least a somewhat token password).

Should we instruct users to continue to set up a password for this role? Or should we also update the Linux instructions to set up local trust authentication and not bother with setting up a password in either scenario?

@crespire crespire linked a pull request Dec 9, 2024 that will close this issue
7 tasks
@wise-king-sullyman
Copy link
Member

Thanks for putting up this issue!

Tagging @TheOdinProject/rails-path for thoughts

@crespire
Copy link
Contributor Author

Thanks for putting up this issue!

Tagging @TheOdinProject/rails-path for thoughts

The same change will be reflected for the node JS lesson as well, so I will have to look at that lesson and its subsequent ones just see if there are any changes required once the local trust authentication question is settled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants