Functional Web Development with Elixir, OTP, and Phoenix: Initializing GenServer State fails entirely

The whole section above breaks when running iex -S mix. Further, the book source code will not compile for that chapter. It’s curious why I am the first person to note this …

2 Likes

me too

well - it does compile - just does not “work” - cannot do " iex>Coordinate.new(1,1) " page 15
** (UndefinedFunctionError) function IslandsEngine.Coordinate.new/2 is undefined (module IslandsEngine.Coordinate is not available)
IslandsEngine.Coordinate.new(1, 1)

maybe needs mods for newer version of elixir…?
(but what?)

1 Like

oh - the book refers to “model_data/lib/island_engine/coordinate.ex” - but that is really (should be) without the model_data… so just lib/island_engine/coordinate.ex. - as well as guesses.ex, island.ex, etc.

also apparently the config dir and file is not create with mix new (this is currently on purpose)

and now it all works (so far :slight_smile: )

1 Like