Hey folks. I have a silly Phoenix question. Do you absolutely have to have `postgres` as a database name on your postgres server? I ask cos I'm trying to connect to a remote managed db, and I've got this test app I made. When I try to mix ecto.create, it gives me "** (Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database "postgres" does not exist" despite having changed all the credentials in the configs
I found https://github.com/cockroachdb/cockroach/issues/23893 which seems to suggest it's trying to look at information_schema/pg_catalog. Not really sure what's going on - I changed all occurrences of `postgres` in the configs to the actual name of the db. Same with the username. And yet, it's still giving that error.
Just following up - it really does appear that Postgrex or Ecto or something needs the `postgres` db to exist in order for it to run `mix ecto.create`. This managed db service I'm using doesn't have the postgres db. The act of simply running `CREATE DATABASE postgres WITH OWNER myuser` and then running the `mix ecto.create` again made it possible to create the actual database my app wants to use.
the managed database doesn't contain a postgres database. As soon as I created one, it worked.
it seems like the ecto.create task needs to connect to the postgres table before it can create the application's database. The alternative method is, yea, use the default db they set aside.
Silly question…. when you do render: json @project, what is the method that gets invoked? Is it .as_json? I need to override it so it returns additional data. I saw there are gems I can add, but this should be possible within Rails itself, right? (can’t use jbuilder for this as the other library I’m using also delegates to the model for the serialization.
I’m not convinced more than 10% of the Rails developers in the world understand how the pipeline even works.
There is so much conflicting and contradictory stuff out there on how to solve problems with it :D
tubbo: I was thinking about that - if you put those folders back in public/ does Rails still route tings there?
tubbo: I’m not sure that’s true - I think Rails itself goes out of its way to keep you from doing JS. I’m tripping over turbolinks right now trying to get some react stuff to work. Fighting the framework a lot :(