Seed Data with Elixir

My error after running mix run priv/repo/seed.exs

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

is it because of the input of the data?

2 Likes