
Chrichton
Ash Framework Book: various errata
I created my own tunez app from scratch using mix new tunes_hg
I successfully followed the book creating the ash_resource ‘artist’.
I created the migrations using mix ash.codegen create_artists
Then I did mix ash.migrate and got the error:
Postgrex.Protocol (#PID<0.198.0>) failed to connect: ** (Postgrex.Error) FATAL 3D000 (invalid_catalog_name) database “tunes_hg_dev” does not exist.
I searched the internet for this error and found mix ash.setup
Using it worked out perfectly.
mix ash.setup
Getting extensions in current project…
Running setup for AshPostgres.DataLayer…
The database for TunesHg.Repo has been created
05:31:11.988 [info] == Running 20250116154542 TunesHg.Repo.Migrations.InitializeExtensions1.up/0 forward
…
== Migrated 20250117040821 in 0.0s
Maybe others may trip on this error to?
Heiko Goes
P.S.: I am very happy with your book
First Post!

Chrichton
Errata
I think on page 12:
To create an Artist record, we need to provide the data to be stored — in this
case, the name and biography attributes, in a map. (The other attributes, such
as timestamps, will be automatically managed by Ash.) We call these the
attributes that the action accepts, and can list them in the action with the
accept macro.
01/lib/tunez/music/artist.ex
actions do
create :create do
accept [:name, :biography]
end
it should be keyword list and not map
All the best from Heiko
Popular Pragmatic topics










Other popular topics










Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /textmate
- /react-native
- /sublime-text
- /kubuntu
- /arch-linux
- /revery
- /ubuntu
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /c
- /julia
- /slackware
- /neovim