Hi all! Trying to get a project setup for testing with my functioning Ecto database by following the docs . Running into an issue-
I keep getting an error upon compiling-
** (File.Error) could not read file "/photo_grid/config/dev.exs": no such file or directory
I know that this is related to the bottom import_config
line in config.exs, right?
config/config.exs
import Config
config :photo_grid, Posts.Repo,
database: "photo_grid_repo",
username: "postgres",
password: "pass",
hostname: "localhost"
config :photo_grid, ecto_repos: [Posts.Repo]
import_config "#{Mix.env()}.exs"
From the docs, it’s just looking for this test.exs
file also located under the config
directory right?
config/test.exs
use Mix.Config
config :photo_grid, PhotoGrid.Repo,
username: "postgres",
password: "postgres",
database: "photo_grid_test",
hostname: "localhost",
pool: Ecto.Adapters.SQL.Sandbox
I’m not sure how to set this correctly or what I’m missing. Thanks for any help