Chrichton

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 :smile:

First Post!

Chrichton

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 Top

telemachus
Python Testing With Pytest - Chapter 2, warnings for “unregistered custom marks” While running the smoke tests in Chapter 2, I get these...
New
mikecargal
Title: Hands-On Rust (Chap 8 (Adding a Heads Up Display) It looks like ​.with_simple_console_no_bg​(SCREEN_WIDTH*2, SCREEN_HEIGHT*2...
New
herminiotorres
Hi! I know not the intentions behind this narrative when called, on page XI: mount() |&gt; handle_event() |&gt; render() but the correc...
New
New
brian-m-ops
#book-python-testing-with-pytest-second-edition Hi. Thanks for writing the book. I am just learning so this might just of been an issue ...
New
adamwoolhether
I’m not quite sure what’s going on here, but I’m unable to have to containers successfully complete the Readiness/Liveness checks. I’m im...
New
jskubick
I found an issue in Chapter 7 regarding android:backgroundTint vs app:backgroundTint. How to replicate: load chapter-7 from zipfile i...
New
brunogirin
When trying to run tox in parallel as explained on page 151, I got the following error: tox: error: argument -p/–parallel: expected one...
New
kolossal
Hi, I need some help, I’m new to rust and was learning through your book. but I got stuck at the last stage of distribution. Whenever I t...
New
SlowburnAZ
Getting an error when installing the dependencies at the start of this chapter: could not compile dependency :exla, "mix compile" failed...
New

Other popular topics Top

Devtalk
Hello Devtalk World! Please let us know a little about who you are and where you’re from :nerd_face:
New
Devtalk
Reading something? Working on something? Planning something? Changing jobs even!? If you’re up for sharing, please let us know what you’...
1020 16971 374
New
AstonJ
What chair do you have while working… and why? Is there a ‘best’ type of chair or working position for developers?
New
wolf4earth
@AstonJ prompted me to open this topic after I mentioned in the lockdown thread how I started to do a lot more for my fitness. https://f...
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
New
PragmaticBookshelf
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
First poster: joeb
The File System Access API with Origin Private File System. WebKit supports new API that makes it possible for web apps to create, open,...
New
AstonJ
Was just curious to see if any were around, found this one: I got 51/100: Not sure if it was meant to buy I am sure at times the b...
New

Latest in PragProg

View all threads ❯