I am working on a new application with Elixir, Dish_out. I want to see Data I follow this tutorial with Elixir Casts. However, I am not sure if what I am doing is correct because my seed file does not work.
My Seed File:
alias DishOut.Recipes
Recipes.insert!(
%{title: "Mac N Cheese", ingredients: "Elbow Pasta, Milk, Cheese, Heavy cream", summary: "Bring pasta to a boil for 10 mins, drain water, add milk, cream, and cheese in. Stir and allow to cool before consuming.", date: "032022"}
)
In video the moderator alias another file, what is that file?
mix run priv/repo/seeds.exs
** (UndefinedFunctionError) function DishOut.Foods.Food.insert!/1 is undefined or private
(dish_out 0.1.0) DishOut.Foods.Food.insert!(%{date: 5062002, ingredients: "Elbow Pasta, Milk, Cheese, Heavy cream", summary: "Bring pasta to a boil for 10 mins, drain water, add milk, cream, and cheese in. Stir and allow to cool before consuming.", title: "Mac N Cheese"})
(elixir 1.12.0) lib/code.ex:1261: Code.require_file/2
(mix 1.12.0) lib/mix/tasks/run.ex:146: Mix.Tasks.Run.run/5
(mix 1.12.0) lib/mix/tasks/run.ex:86: Mix.Tasks.Run.run/1
(mix 1.12.0) lib/mix/task.ex:394: anonymous fn/3 in Mix.Task.run_task/3
(mix 1.12.0) lib/mix/cli.ex:84: Mix.CLI.run_task/2
(elixir 1.12.0) lib/code.ex:1261: Code.require_file/2