Mix ash_postgres.create problem
When I run mix ash_postgres.create on my project, I get the following error message in the terminal console:
mix ash_postgres.create
** (Protocol.UndefinedError) protocol Enumerable not implemented for Bbg.Bids of type Atom
(elixir 1.14.3) lib/enum.ex:1: Enumerable.impl_for!/1
(elixir 1.14.3) lib/enum.ex:166: Enumerable.reduce/3
(elixir 1.14.3) lib/enum.ex:4307: Enum.reverse/1
(elixir 1.14.3) lib/enum.ex:3646: Enum.to_list/1
(elixir 1.14.3) lib/enum.ex:4251: Enum.flat_map_list/2
lib/mix/helpers.ex:11: AshPostgres.MixHelpers.apis!/2
lib/mix/helpers.ex:41: AshPostgres.MixHelpers.repos!/2
lib/mix/tasks/ash_postgres.create.ex:37: Mix.Tasks.AshPostgres.Create.run/1
I have thoroughly checked all settings and cannot seem to see why I am getting this error. I expect I am overlooking something. However, I am not sure what it is. Any suggestions would be helpful. Thanks for your help.
3 Replies
You probably have something like this in config
config :your_app, ash_apis: Bbg.Bids
instead of config :your_app, ash_apis: [Bbg.Bids]
Thanks Zach. The problem was exactly as you described. Syntax error on my part. Thanks again for the fast response and great work on Ash.
my pleasure, glad you got it worked out 😄