small medium large xlarge

The latest version of the book is B7.0, released 2 months ago. If you've bought a PDF of the book and would like to update it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: B7.0 (22-Mar-19)
#84719
PDF page: many
p 39: last paragraph "By default, our application starts [...] controlls" => controls p 76: last paragraph "Keep in mind [...] excelent" => excelle...more...
  • Reported in: B2.0 (01-Jul-18)
#83312
PDF page: 0
Maybe mentioning IEx.pry, even in a side note, would be helpful for some. The book, especially combined with the official documents, is great, but bei...more...
Bruce Tate says: Good idea. We'll look at this one.
  • Reported in: B7.0 (23-Mar-19)
#84723
PDF page: 5,6
For some reason when reading the MOBI version in the kindle.app (1.25.2 (52078)) on macos, the indentation for code snippets is correct, but not when ...more...
  • Reported in: B7.0 (18-May-19)
#85254
PDF page: 9

LiveVeiw should be LiveView--Kevin Tindall

  • Reported in: B7.0 (21-Mar-19)
#84708
PDF page: 13
“We will add a treatment of LiveVeiw in the last chapter.” Excerpt From: Chris McCord, Bruce Tate, José Valim. “Programming Phoenix ≥ 1.4 (for M Ch...more...
  • Reported in: B7.0 (26-Apr-19)
#84982
PDF page: 23

"[name: name] is shorthand for [{name: name}] ." Should this not be: [name: name] is shorthand for [{:name, name}] .--Dylan Weremeichik

  • Reported in: B7.0 (05-May-19)
#85015
PDF page: 30
José mentioned 8080 (HTTPS) as alternative, additional endpoint. There is nothing inherently wrong with it, but it might be better to use 8080 port in...more...
  • Reported in: B7.0 (15-Apr-19)
#84889
PDF page: 33
When I run mix phx.new hello I have to manually add "cd assets && npm install ..." The console output on page 33 indicates that this happens aut...more...
  • Reported in: B7.0 (27-Apr-19)
#84984
PDF page: 37

"We need to do one more bit of housekeeping." => bits--Dylan Weremeichik

  • Reported in: B7.0 (23-Apr-19)
#84961
PDF page: 39

« This tree is a piece of code that controlls » —> controls.
--Laurent Delpoux

  • Reported in: B7.0 (23-Apr-19)
#84962
PDF page: 41
« We'll add a couple functions which allows […] » —> allow. Unless you meant « Adding a couple functions allows » (the fact of adding those functions...more...
  • Reported in: B7.0 (27-Mar-19)
#84782
PDF page: 42
Paper page: 28
In the second paragraph, you state that the application.ex file is lib/application.ex when it is actually in lib/<project-name>/application.ex. In th...more...
  • Reported in: B7.0 (28-Mar-19)
#84784
PDF page: 55
Paper page: 41
In the paragraph right before the listing for lib/rumbl/accounts.ex, second sentence, there is a missing word "of" after the word "couple". It should...more...
  • Reported in: B7.0 (30-Mar-19)
#84800
PDF page: 55
The following sentences have redundancy that should be consolidated: The mix ecto.gen.migration creates a migration file for us with a special time...more...
  • Reported in: B7.0 (18-Apr-19)
#84925
PDF page: 55

"allow us to work more easy with changesets" should be "allow us to work more easily with changesets".--Tom Head

  • Reported in: B7.0 (17-Apr-19)
#84900
PDF page: 56

Footnote link to documentation of ecto migration is wrong--Hoang Tran

  • Reported in: B5.0 (13-Jan-19)
#84306
PDF page: 62
resources "/users", UserController, only: [:index, :show, :new, :create] leads to an error. :new and :show have to be the other way around! resources...more...
  • Reported in: B7.0 (30-Apr-19)
#84997
PDF page: 66,92
I made it to page 92 without understanding the "Routes.some_path" bit (from page 66 -- the first time it is actually explained). At this point in the ...more...
  • Reported in: B7.0 (17-Apr-19)
#84903
PDF page: 67
We now have a literal dependency on Ecto.Changeset in our web controller. Two pages earlier there was an extra aside regarding not coupling form_for ...more...
  • Reported in: B7.0 (22-Mar-19)
#84713
PDF page: 67
I think the code here: media.pragprog.com/titles/phoenix14/code/ecto/listings/rumbl/lib/rumbl_web/controllers/user_controller.change3.ex Should rea...more...
  • Reported in: B7.0 (12-Apr-19)
#84869
PDF page: 69

iex> -r Rumbl.Accounts.User

should be

iex> r Rumbl.Accounts.User--Arif Hussain Bangash

  • Reported in: B6.0 (03-Feb-19)
#84432
PDF page: 73
The listings and code downloads of the book place the accounts.ex file at lib/rumbl/accounts.ex but the generator command given on page 73 is not give...more...
  • Reported in: B7.0 (17-Apr-19)
#84904
PDF page: 74
Tweaking xxx_create_credentials.exs to reference :users breaks the generated test scripts. In general, there is suspiciously little testing in these...more...
  • Reported in: B7.0 (17-Apr-19)
#84910
PDF page: 76

typo:
OWASP has an excelent set ...

correct:
OWAS has an excellent set ...--Johannes Rubenz

  • Reported in: B7.0 (20-Mar-19)
#84706
PDF page: 76
The footnote link to OWASP leads to a valid page but the page redirects visitors to a Github URL which I can't add here due to anti-spam rules.--Simon...more...
  • Reported in: B7.0 (21-Apr-19)
#84940
PDF page: 77
I could not get the function put_pass_hash/1 to work (maybe because I try to many things at the same time as reading ..?), my problem was that the fie...more...
  • Reported in: B7.0 (17-Apr-19)
#84905
PDF page: 79
Updating existing users with properly hashed temporary passwords and placeholder emails should probably be a migration, not something someone does (or...more...
  • Reported in: B6.0 (10-Mar-19)
#84668
PDF page: 86
I ran the generate context command, but it didn't warn me about generating code in an existing context. It created the file /rumblr/accounts/accounts....more...
  • Reported in: B7.0 (21-Apr-19)
#84937
PDF page: 86
Paper page: 72
Update comeonin and pbkdf2_elixir to their latest versions. i.e. defp deps do [ ..., {:comeonin, ">= 5.1.1"}, # instead of 4.1 {:pbkdf2_elixir, "...more...
  • Reported in: B4.0 (07-Oct-18)
#83739
PDF page: 91
Paper page: 79
Trying to update the users before the password with the iex command at the bottom of the page. It looks like: iex(1)> alias Rumbl.Repo Rumbl.Repo ...more...
  • Reported in: B6.0 (11-Mar-19)
#84675
PDF page: 93
The function change_registration is created, but never used. It could be used right below in the register_user function, but the authors inlined the s...more...
  • Reported in: B7.0 (30-Mar-19)
#84804
Paper page: 94
The end of page 94 says "Let’s logout and...", but the logout functionality is only created a few pages later, thus we can't (easily) logout yet. G...more...
  • Reported in: B6.0 (13-Mar-19)
#84680
PDF page: 94
You write, "When a user isn’t found, we use comeonin’s dummy_checkpw() function to simulate a password check with variable timing. This hardens our au...more...
Bruce Tate says: José? What do you think?
  • Reported in: B7.0 (15-Apr-19)
#84884
PDF page: 96
This logout link will not work because Phoenix HTML changes the method from `delete` to `post` because the HTML spec only supports get/post/dialog met...more...
  • Reported in: B7.0 (17-May-19)
#85250
PDF page: 116

It says "Then, the list_user_videos and get_user_videos utility functions", but then we define get_user_video (singular).--Samuel Müller

  • Reported in: B6.0 (13-Mar-19)
#84679
PDF page: 116
A section in this page says "Phoenix frees you from memorizing unnecessary singular and plural conventions by consistently using singular forms in sch...more...
Bruce Tate says: Added a "in most cases".
  • Reported in: B7.0 (15-Apr-19)
#84882
PDF page: 118
Not sure if this is the right page number. The `get_user_video!/2` function here includes a line I think is missing in the code download for the Testi...more...
  • Reported in: B7.0 (18-May-19)
#85261
PDF page: 122

It says "and create an unique index for it" - the word "an" should be "a".--Samuel Müller

  • Reported in: B7.0 (19-Mar-19)
#84701
PDF page: 122
On the top of the page, the text says: <<Remember to update your repository by running migrations: $ mix ecto.migrate>> But the migration should no...more...
  • Reported in: B7.0 (05-Apr-19)
#84834
PDF page: 125
Text states: "We also import our Repo and Category." Earlier text states "Importing Ecto.Query makes the...". Code above the paragraph lists "import E...more...
  • Reported in: B2.0 (10-Jul-18)
#83356
PDF page: 125
The interplay between the router and the injected action/2 is not very clear in the text (router does not call index/show/edit/etc directly; router ca...more...
Bruce Tate says: Good idea. We'll take a look at suggestions like these when all the chapters are in once we know how tight our production schedules are.
  • Reported in: B7.0 (18-May-19)
#85262
PDF page: 126
The sentence doesn't make sense: "We’ll put query functions in our schema layer and leave complex interactions, such as those between our multimedia ...more...
  • Reported in: B5.0 (25-Oct-18)
#83817
PDF page: 127
Paper page: 115
When editing a video, edit/2 raises an error: ** (RuntimeError) attempting to cast or change association `user` from `Rumbl.Multimedia.Video` that ...more...
  • Reported in: B7.0 (24-Apr-19)
#84976
PDF page: 127
On page 127, it's suggested that we do the following: def alphabetical(query) do from c in query, order_by: c.name end def list_alphabetical...more...
  • Reported in: B7.0 (03-May-19)
#85008
PDF page: 129
With regards to Ecto queries: "In Elixir, the ^ operator (called the pin operator) means we want to match against this specific version of ^username ...more...
  • Reported in: B7.0 (20-Mar-19)
#84703
PDF page: 132
Hi, Is the pin operator needed when the value is a literal in the following expression? <<iex> j_users = from u in users_count, where: ilike(u.u...more...
  • Reported in: B7.0 (20-May-19)
#85279
PDF page: 133
Chapter 5, accounts.change2.ex: The functions "Comeonin.Pbkdf2.checkpw" and "Comeonin.Pbkdf2.dummy_checkpw" are now removed. Their alternatives ...more...
  • Reported in: B7.0 (20-Mar-19)
#84704
PDF page: 137
About the phrase: <<Oops. Our application blows up with a constraint error, similar to the one we saw when creating duplicated categories.>> There ...more...
  • Reported in: B7.0 (20-Mar-19)
#84705
PDF page: 140
The following code: << iex> changeset = foreign_key_constraint(changeset, :videos, name: :videos_category_id_fkey, message: "still exist") >> fa...more...
  • Reported in: B6.0 (17-Mar-19)
#84695
PDF page: 152
It's mentioned here that we could add :nifily_all to the references function. I tried to do that without rolling back (by creating a new migration), a...more...
  • Reported in: B7.0 (03-May-19)
#85009
PDF page: 153
Paper page: 164
"We close by trying to register two identical users, then asserting the accounts system claims our username has already been taken." In the testin...more...
  • Reported in: B7.0 (11-Apr-19)
#84847
PDF page: 161
This is a duplicate of #84698 from B6.0, I'm just adding more context. For the listing: testing_mvc/listings/rumbl/lib/rumbl_web/controllers/auth.cha...more...
  • Reported in: B6.0 (18-Mar-19)
#84697
PDF page: 167

"we checked our the ability" should be "we checked our ability"--Pietro Coelho

  • Reported in: B7.0 (11-Apr-19)
#84846
PDF page: 171
For the listing in testing_mvc/listings/rumbl/config/test.change1.exs you change the config: config :pbkdf2_elixir, :rounds, 1 so that the tests...more...
  • Reported in: B6.0 (18-Mar-19)
#84698
PDF page: 171

On the code "user = conn.assigns[:current_user]" the variable "user" is unused. So maybe just check for "conn.assigns[:current_user]"?--Pietro Coelho

  • Reported in: B6.0 (17-Mar-19)
#84694
PDF page: 189
Users are likely to get a slightly different error when trying to click the "Watch" button from the videos-index page after making the changes to rend...more...
  • Reported in: B7.0 (23-Mar-19)
#84725
PDF page: 197
The part "Though we place our implementation in the same file as the video definition, it could as easily exist elsewhere." is incorrect. The example ...more...
  • Reported in: B7.0 (28-Apr-19)
#84995
PDF page: 212
The top of page 212 says "Remember to update your repository by running migrations:" and then "And now you can migrate your database:", both with the ...more...
  • Reported in: B7.0 (23-Mar-19)
#84726
PDF page: 217
on the window.userToken snippet, the code calls Routes.static_url. However, the generated code on app.html.eex is using Routes.static_path. It is a bi...more...
  • Reported in: B7.0 (29-Mar-19)
#84787
PDF page: 218
The generated UserSocket module from Phoenix has the connect function with this signature: def connect(%{"token" => token}, socket, _connect_info) ...more...
  • Reported in: B7.0 (23-Mar-19)
#84727
PDF page: 221
When we generated our Multimedia context, the main file was created in rumbl/multimedia/multimedia.ex. However, the filepath in the book points to rum...more...
  • Reported in: B7.0 (04-Apr-19)
#84820
PDF page: 223

In the phrase: "but neccesary details of such a refactoring exercise", "neccesary" is misspelled. It should be "necessary".--Nick Rasband

  • Reported in: B7.0 (04-Apr-19)
#84821
PDF page: 224
In the sentence: "That way you can see one of the interesting aspects of observer, it’s ability to show a high level view of processes that can help y...more...
  • Reported in: B7.0 (23-Mar-19)
#84728
PDF page: 224
I think it would be nice to have some explanation here around naming, because Phoenix.View.render_many and render_one need a function render() to be d...more...
  • Reported in: B7.0 (04-Apr-19)
#84822
PDF page: 225
In the sentences: "There’s more. Since communication happens with ...", I think it would be better to write it "There's more: since communication happ...more...
  • Reported in: B7.0 (04-Apr-19)
#84823
PDF page: 226

iex -S mix phoenix.server

should be

iex -S mix phx.server--Nicholas Rasband

  • Reported in: B7.0 (06-May-19)
#85024
PDF page: 230
This whole section on copying files around is pretty much ignorant of version control. This approach will lose all history for files etc. Granted, thi...more...
  • Reported in: B7.0 (15-May-19)
#85234
PDF page: 230
"We’ll need all three of the dependencies, :comeonin , :pbkdf2_elixir and :sweet_xml ." You talk about sweet_xml here like it was previously a depende...more...
  • Reported in: B7.0 (23-Mar-19)
#84729
PDF page: 230
In this wrapping up, it says we built a server-side channel with support for both WebSockets and long-polling. However when the socket was created, it...more...
  • Reported in: B7.0 (06-May-19)
#85028
PDF page: 231
rumbl_umbrella/apps/rumbl/ lib/rumbl/application.ex needs more clean up than mentioned in the text. My file still contained # Tell Phoenix to...more...
  • Reported in: B7.0 (15-May-19)
#85235
PDF page: 232
"Oops. That didn’t work as we’ve not yet fetched dependencies. We’ll have to run it later after we’ve fetched our dependencies." Everything here runs ...more...
  • Reported in: B7.0 (29-Mar-19)
#84789
PDF page: 238

I think it's important to mention that this dep also needs to be added to rumbl_web project:

{:info_sys, in_umbrella: true}
--Pietro Coelho

  • Reported in: B7.0 (25-Mar-19)
#84757
PDF page: 241
children = [ {Counter, 5}, # new counter worker ] should be: children = [ {InfoSys.Counter, 5}, # new counter worker ] and the same for a...more...
  • Reported in: B7.0 (25-Mar-19)
#84759
PDF page: 247

iex> {:ok, agent} = start_link(fn -> 5 end)

should be:

iex> {:ok, agent} = Agent.start_link(fn -> 5 end)
--Dan Jantea

  • Reported in: B7.0 (06-May-19)
#85029
PDF page: 247
The text says to change lib/rumbl/application.ex, but the listing says rumbl_umbrella/apps/info_sys/lib/info_sys/application.ex In general the prec...more...
  • Reported in: B7.0 (13-Apr-19)
#84871
PDF page: 249

Add a graphic/image of the goal InfoSys supervision tree. It'll give a visual context of how the pieces go together.--Jesse Goerz

  • Reported in: B7.0 (25-Mar-19)
#84760
PDF page: 250
The file path is wrong in the following paragraph: <<Armed with what little we know about our supervision strategy, let’s make our base supervisor...more...
  • Reported in: B7.0 (07-May-19)
#85031
PDF page: 250
Text says "We also pass the initial state of an empty list, which we don’t intend to use. " Code does not pass an empty list. Arguably opts could ...more...
  • Reported in: B7.0 (25-Mar-19)
#84761
PDF page: 251
Both the main application supervisor and the child supervisor are named InfoSys.Supervisor in the listing "otp/listings/rumbl_umbrella/apps/info_sys/l...more...
  • Reported in: B7.0 (21-May-19)
#85284
PDF page: 251
The registered name of the module InfoSys.Supervisor is the same as the name in the InfoSys.Application module which causes a runtime error.--John Oxf...more...
  • Reported in: B7.0 (07-May-19)
#85030
PDF page: 251
Each of our supervisors will have two children, first a Task supervisor to spawn tasks isolated under their own supervisor, followed by a InfoSys.Ca...more...
  • Reported in: B7.0 (27-Mar-19)
#84779
PDF page: 251
Application starts the supervisor twice and crashes. defmodule InfoSys.Application do @moduledoc false use Application def start(_type, _args) d...more...
  • Reported in: B7.0 (16-May-19)
#85243
PDF page: 251
"Now you’re ready to add the new supervisor into our application’s supervision tree in lib/rumbl.ex , like this: otp/listings/rumbl_umbrella/apps/in...more...
  • Reported in: B7.0 (25-Mar-19)
#84763
PDF page: 255
The changes listed in "otp/listings/rumbl_umbrella/apps/info_sys/lib/info_sys/cache.change1.ex" are already included in listing "otp/listings/rumbl_um...more...
  • Reported in: B7.0 (27-Mar-19)
#84781
PDF page: 255
The "changes" (adding the schedule clear function and calling it from the handle_info(:clear, state) call) are already included in the code snippet fr...more...
  • Reported in: B7.0 (13-May-19)
#85103
PDF page: 255
When trying to run the code in iex listed on page 255, where you take the cache for "a test spin", I get the following error when running "Cache.put("...more...
  • Reported in: B7.0 (24-Mar-19)
#84733
PDF page: 255
I'm trying to run the InfoSys.Cache example. I've previously built the app in B6.0 of the book. When I try to start the app in the umbrella/apps/info_...more...
  • Reported in: B7.0 (27-Mar-19)
#84780
PDF page: 256
The init function doesn't produce a table of the module name. The code works if a new (named) table is created and passed as an option to the put or f...more...
  • Reported in: B7.0 (25-Mar-19)
#84764
PDF page: 257
The path of the file is wrong in the following paragraph: "Let’s create our interface in lib/rumbl/info_sys.ex, like this:" It should be: "Le...more...
  • Reported in: B7.0 (24-Mar-19)
#84734
PDF page: 258
"let’s make our base supervisor in lib/rumbl/info_sys/supervisor.ex": This path is incorrect because it points to "rumbl". It should be "lib/info_sys"...more...
  • Reported in: B7.0 (17-May-19)
#85247
PDF page: 258
"@callback name() :: String.t" does not follow the convention of mix format or the rest of the code sample. It should be "@callback name() :: String.t...more...
  • Reported in: B7.0 (17-May-19)
#85249
PDF page: 259
1. "Create a config/dev.secret.exs file and include your WolframAlpha key under Mix.Config under the top-level umbella app" 2. "When you ran mix phx...more...
  • Reported in: B7.0 (07-May-19)
#85034
PDF page: 259
The text says The compute function takes a String.t query, a Keyword.t list of options, and returns a type we’ll define later called InfoSys.Resu...more...
  • Reported in: B7.0 (05-Apr-19)
#84832
Paper page: 261
Suggestion. By the time I got the InfoSys.compute working, I was confused about the supervision tree we set up. It looks like this: InfoSys.InfoSu...more...
  • Reported in: B7.0 (15-May-19)
#85231
PDF page: 261
When running the "InfoSys.compute("what is elixir?")" in iex, the following error appears: iex(1)> InfoSys.compute("what is elixir?") ** (exit) ex...more...
  • Reported in: B7.0 (24-Mar-19)
#84735
PDF page: 263
This page contains a listing with the code for schedule_clear. However all this code was already presented on the previous listing. So if the reader c...more...
  • Reported in: B7.0 (07-May-19)
#85033
PDF page: 264
On this page the InfoSys.Result struct suddenly stops containing an url field. Previous results always contained an url field, which is always nil. S...more...
  • Reported in: B7.0 (13-Apr-19)
#84877
PDF page: 269
"Note we’re using our user-facing create_user function instead of the user-facing register_user function." Should maybe be: "... our API-facing.....more...
  • Reported in: B7.0 (26-Mar-19)
#84769
PDF page: 272
The tests from the listing "testing_otp/listings/rumbl_umbrella/apps/info_sys/test/cache_test.exs" do not work unless they are preceded with a "clear_...more...
  • Reported in: B7.0 (07-May-19)
#85035
PDF page: 274

funciton should be function--Henrik Horneber

  • Reported in: B7.0 (07-May-19)
#85037
PDF page: 275
Regarding the TestBackend module, the text says "Since our backends are tasks, we’ll need to fire up a task in start_link." Why do we need to fire ...more...
  • Reported in: B7.0 (18-May-19)
#85257
PDF page: 279
"let’s require the file in each test suite. Add the following line to the top of your rumbl_umbrella/apps/info_sys/test/test_helper.exs :" You say t...more...
  • Reported in: B7.0 (18-May-19)
#85258
PDF page: 279
Per my previous Erratum on this page, I believed that the entry was needed in the second file. However it appears to not be needed and was an issue wi...more...
  • Reported in: B7.0 (26-Mar-19)
#84771
PDF page: 280
Regarding the paragraph: <<Let’s take the test with results. First, we spawn a Wolfram backend with start_link. Next, we use assert_receive to ens...more...
  • Reported in: B7.0 (26-Mar-19)
#84772
PDF page: 281

In the last paragraph on the page, there is no model_case in the code. Only data_case and conn_case.--Dan Jantea

  • Reported in: B7.0 (18-May-19)
#85259
PDF page: 284

"testing_otp/listings/rumbl_umbrella/apps/rumbl_web/test/support/test_helpers.exs"
should be file extension "ex" -- not "exs"--Dylan Weremeichik

  • Reported in: B7.0 (26-Mar-19)
#84774
PDF page: 285
On the last two paragraphs on the bottom of the page, you are describing the test "join replies with video annotations", while in the above listing "t...more...
  • Reported in: B7.0 (14-Apr-19)
#84878
PDF page: 285
After adding this listing testing_otp/listings/rumbl_umbrella/apps/rumbl_web/test/rumbl_web/channels/video_channel_test.exs I consistently got this...more...
  • Reported in: B7.0 (26-Mar-19)
#84775
PDF page: 287
The test case "new annotations triggers InfoSys" from the listing "testing_otp/listings/rumbl_umbrella/apps/rumbl_ … umbl_web/channels/video_channel_t...more...
  • Reported in: B7.0 (28-Mar-19)
#84783
PDF page: 289
There is exactly one occurrence of "model_case" in the whole book, and it is in this page. I don't know what the book is referring to here--Pietro Coe...more...
  • Reported in: B7.0 (28-Mar-19)
#84786
PDF page: 292
On this page, default_video was created as a module attribute, but default_user was created as a function. Maybe use the same pattern on both to avoid...more...
  • Reported in: B7.0 (29-Mar-19)
#84788
PDF page: 295
There's a repeated listing in this page. The test "new annotations triggers InfoSys" was already added on previous listing. There's two different expl...more...
  • Reported in: B7.0 (13-Apr-19)
#84870
PDF page: 296

Add a graphic/image of our goal InfoSys supervision tree. It'll give a visual context of how the pieces go together.--Jesse Goerz