This may have been brought before, but I’m listing here some bumps I found in the first chapter (guestbook project) so they may be useful to others.
- LightTable failed to start with “Unable to resolve var: reader/alias-map in this context” error. The solution is to exclude the dependency for tools.reader in compojure, that requires 0.7.3, and add an explicit dependency for a more recent one. My project.clj dependencies are the following:
:dependencies [[org.clojure/clojure "1.6.0"]
[compojure "1.1.6" :exclusions [org.clojure/tools.reader]]
When I first created an Instarepl, it wouldn’t run
(use guestbook.repl) with the error “java.io.FileNotFoundException: Could not locate guestbook/repl__init.class or guestbook/repl.clj on classpath:”. This happened because it was connected to the editor connection. I disconnected and created another Instarepl, when it asked which connection I wanted.
After creating the POST route, the browser would always redirect to the not found page. It was necessary to execute the
app at guestbook.handler to refresh home-routes.
The DB section was easy after these :)