We try to keep our books accurate, but sometimes mistakes creep in. This page lists the errors submitted by our astute readers. If you've found a new error, please submit it.

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

Key: Typo Tech. Error Suggestion Not a problem Next edition

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

(To find out what version you have, look at the copyright page, a few pages in from the front of the book. If it says (say) 'Second Printing', then here it'll be P2.0. If there are interim PDF releases in that printing, they'll be 2.1, 2.2, and so on.)

PDF Paper Description Found in Fixed in
4
#76800: I got an error when I did the following: > lein ring server 'ring' is not a task. See 'lein help'. Did you mean this? run > le...more...
Dmitri Sotnikov says: You either did not create the application using a web template such as `lein new compojure-app myapp` or you're not running lein from the root directory of the project.
P1.0
16-May-14
7
#76814: I either had an error or nothing happened when I tried create a connection to project.clj the way it is explained in the book. I found a wo...more...
P1.0
22-May-14
7
#76331: Workaround for #58780, #58805, #53320 Type "lein clean" in the guestbook folder (containing project.clj). This will update dependencies. ...more...
P1.0
25-Jan-14
7
#58780: Another follow-up to #53320 since I haven't seen it directly addressed: I had the same error with a fresh clojure install / the latest versio...more...
B6.0
01-Jan-14
7
#76447: I received an error similar to others when using Light Table 0.6.4 and adding the Clojure connection and evaluating a form. The error was abou...more...
P1.0
22-Feb-14
7

#58805: Unable to add repl connection and/or evaluate in instant repl because of clojurescript issues. Maddening start to my first clojure exploration.--Cory Wilkerson

B6.0
06-Jan-14
7
#76727: I had the same error as described in #76447. I used the newest version of LightTable (0.6.5) and of the compojure-app template. To fix it, ...more...
Dmitri Sotnikov says: It would probably be a good idea to make this a topic in the forums as a few people seem to have run into issues using Light Table.
P1.0
26-Apr-14
8
#53320: Light table can't make the connection: Unable to resolve var: reader/*alias-map* using version 0.5.20 I wonder if using alpha software in ...more...
Dmitri Sotnikov says: Could you be more specific as to when you get the error. I'm using the same version and it's not exhibiting the problem you're seeing. While it's an alpha, I found that most people find it the easiest to get started. I do discuss alternatives in the appendix however.
B5.0
08-Dec-13
8
#56707: A follow-up to #53320: I'm using the latest version of Light Table (which right now is 0.5.20), and I get the same error: final project: (...more...
Dmitri Sotnikov says: Emacs is definitely the most popular environment for Clojure. I talk about setting it up with `nrepl.el`, that's been recently renamed to `cider` in the Appendix A. If you have the time, it would be good to submit an issue for Light Table. Their issues page can be found here: https://github.com/Kodowa/Light-Table-Playground/issues
B6.0
23-Dec-13
9
#76410: I cannot get LightTable (0.6.4, Mountain Lion) to successfully evaluate `(use 'guestbook.repl)`. It throws the exception: ``` java.io.F...more...
P1.0
15-Feb-14
12
#76448: The list of files in the project contains a typo: ... test/ guestbook/ test/ hanlder.clj should be: ... test/ ...more...
P1.0
22-Feb-14
12

#76266: Via lighttable, http server is firing up on 8080 not 3000 as indicated by the text (localhost:3000).--Cory Wilkerson

B6.0
07-Jan-14
20 9
#76280: If I try to establish a repl connection using LT 0.6.0 I get the error message: We couldn't connect. Looks like there was an issue tryin...more...
Dmitri Sotnikov says: Light Table REPL can get confused by the content in the target folder. When you build your application using lein ring uberwar, that can cause the issue. Running lein clean in the folder should fix the problem.
B6.0
10-Jan-14
32

#58772: The text says: "/all-items and item/:id" but the code uses /foo and /bar--Machiel

B6.0
28-Dec-13
33

#76352: In the middle of the page is a list: the 1st entry is "hanlder
"... I believe it should be "handler".--Boris Mühmer

P1.0
30-Jan-14
33

#76995: hanlder--Vincenzo Piombo

P1.0
13-Jul-14
35

#76281: typo in => hanlder — This namespace is responsible for handling requests and responses.
--Tomasz Sznajder

B6.0
11-Jan-14
38

#76998: you have to
(use 'hiccup.element)
for "link-to" to work, better saying it.--Vincenzo Piombo

P1.0
13-Jul-14
39 28
#76563: Describing keys in http request map, both these entries appear. :query-string — The request’s query string. :request-string — The request’...more...
P1.0
24-Mar-14
41

#76351: "providing the submision form" -- misspelling of submission--Watts

P1.0
30-Jan-14
41
#76994: "For example, if we had routes /all-items and item/:id," should be "For example, if we had routes /foo and /bar/:id," ... using items woul...more...
P1.0
13-Jul-14
44
#76300: present in most applications are as follows: • hanlder — This namespace is responsible for handling requests and responses. ----^ Should...more...
P1.0
16-Jan-14
44
#76421: Application Architecture > Listing of major components (§5.1): "hanlder" should be "handler". Thanks for your book, fine reading so far... ...more...
P1.0
16-Feb-14
44 33

#76482: In the bullet point list "handler" is written as "hanlder".--Tobias Adam

P1.0
05-Mar-14
53 42
#76565: This section is rather confusing overall because it's not immediately clear that you're rewriting the existing code in Hiccup. Much of it is t...more...
Dmitri Sotnikov says: To see why this change is made you have to make sure you understand how the new home function defined in the previous paragraph works. It has been updated to accept new parameters containing the name, message, and the error and display them.
P1.0
24-Mar-14
64

#53361: The "for" loop is missing a leading {

--James Ludlow

B6.0
17-Dec-13
64-70
#53112: For section 3.3, even though the code isn't difficult to guess, it might be nice to define the routes further up in the example so that we can...more...
B4.0
05-Nov-13
93
#76285: inside function valid? vali/rule repeats :pass twice while it should be one :pass and one :pass1 this missing :pass1 is used further in t...more...
B6.0
12-Jan-14
98

#76579: [picture-gallery.util :refer [galleries gallery-path]] is listed as required, but we don't create the file/namespace, or use it.--Jay Dorsey

Dmitri Sotnikov says: These functions will be used at a later time and I felt that it would be simpler to simply include them up front to keep things moving along.
P1.0
30-Mar-14
100
#76581: Let’s start by creating a add-gallery-path helper: (defn gallery-path [] "galleries") Two items: a) doesn't say where to put this (a...more...
P1.0
30-Mar-14
102
#56289: In the first code listing, picture-gallery.util is required, but the namespace does not yet exist. Also, noir.io function resource-path is...more...
B6.0
22-Dec-13
103

#76578: Top of the page, looks like the save-thumbnail function is duplicated in the same code block.--Jay Dorsey

P1.0
30-Mar-14
104
#76290: there is "a" instead of "an". One paragraph is: "Let’s start by creating a add-gallery-path helper" it should be "Let’s start by creating an...more...
B6.0
13-Jan-14
108
#76406: In the handle-upload function, the display of thumbnails of user images won't work as it doesn't allow for user names being included in genera...more...
Dmitri Sotnikov says: If you're referring to the code in the Generating Thumbnails section, then it's intentional. The next section covers refactoring the code to use the user folder for file uploads and thumbnails.
P1.0
13-Feb-14
108

#56288: "In our save-thumbnail function, we call resource-path to get the path of our public folder. "

resource-path is not used in the function. --Rod Knowlton

B6.0
22-Dec-13
111
#76597: The thumbnail-link and display-gallery helpers are displayed twice: once on page 111 and once on page 112. Since the "lets build two helpers" ...more...
P1.0
02-Apr-14
111

#76479: The code for show-galleries calls db/get-gallery-previews, but there's no code shown for this, so the program won't run.--Watts

Dmitri Sotnikov says: Good catch, the code snippet should only be displaying the namespace declaration instead of the entire file.
P1.0
04-Mar-14
112

#76598: handler.clj code is listed twice on the page--Jay Dorsey

P1.0
02-Apr-14
116
#76599: Code block starting with (:require... isn't labeled and it's not immediately clear which file it refers to. Also, the code block introduce...more...
P1.0
02-Apr-14
116
#76600: It looks like the http :// dropped from the jquery path: (include-js "//code.jquery.com/jquery-2.0.2.min.js")] Also, previous comment ab...more...
Dmitri Sotnikov says: That's intentional, the URL is not required to specify a protocol and browsers like Chrome will complain when an HTTP URL is being linked from an HTTPS page. Omitting the protocol allows the browser to select the appropriate one depending on how the page is accessed. You can read more about this [here](http://stackoverflow.com/questions/4831741/can-i-change-all-my-http-links-to-just).
P1.0
02-Apr-14
117
#76831: The line "$(element).parent().parent().remove();" should read "$(element).parent().remove();", otherwise *all* images are removed from the pag...more...
P1.0
01-Jun-14
117

#76282: The definition of app is repeated twice.--Konrad

B6.0
11-Jan-14
118

#76283: the function gallery-link is introduced again, first time it was on page 116.--Konrad Szydlo

B6.0
11-Jan-14
120

#76604: Reference to jquery in the layout.clj code example is missing the http prefix.--Jay Dorsey

Dmitri Sotnikov says: The prefix is not missing, but is rather intentionally omitted. Browsers do not require specifying the protocol and omitting it allows the browser to select the correct protocol when the page is loaded over http or https. When you load a page over https and the protocol for a hyperlink is specified as http, then newer browsers can refuse to load it.
P1.0
03-Apr-14
131

#76297: ns picture-gallery.views.layout :require
includes hiccup.page twice.--Konrad

P1.0
15-Jan-14
132
#76412: The discussion of why you need to implement a Renderable type to wrap the base layout isn't sufficient - why can't you just include the ...more...
Dmitri Sotnikov says: There are definitely simpler ways to access the context, but I felt this was a good place to illustrate how Ring responses are generated and how you can leverage Renderable to hook into the response cycle.
P1.0
15-Feb-14
140
#76416: In listing picture-gallery-style-tests/resources/public/js/site.js the variable 'color' in the document.ready() function is declared but never...more...
P1.0
16-Feb-14
180
#76437: In chapter 6, converting the gallery.js file to clojurescript, the deleteImages function, the code expects returned parameters to be in a keyw...more...
Dmitri Sotnikov says: Hi Oliver, I'm unable to reproduce the problem for the keys. The wrap-restful-format should be detecting the response format based on the Content-Type header, which should be set to application/edn. You could check in Chrome or Firefox what the request looks like and whether the correct Content-Type is being set. I'll close the errata item for now, but maybe we could move this to the discussion area to keep track of the issue.
P1.0
17-Feb-14
193

#76977: "Clojure provides a special form called defn"
defn is not special form but macro.--Shunsaku Matsutani

P1.0
09-Jul-14
198 190

#76978: In "Structuring the Code", example Python code makes no sense.--Shunsaku Matsutani

P1.0
09-Jul-14
200

#76305: In the "The :use Keyword" section in the first paragraph declaring is misspelled as "delcaring"
--Konrad

P1.0
18-Jan-14
228
#76432: The clojurescript gallery.cljs file contains the following code that gathers any errors reported by the backend when deleting images: “(​le...more...
Dmitri Sotnikov says: That's definitely a bug, thanks for noticing it. A proper way to check would be: ~~~ (when-let [error-str (not-empty (.toString errors))] (append! (by-id "error") (str "<ul>" error-str "</ul>"))) ~~~ I'll update the example code.
P1.0
17-Feb-14