15 Apr 2014, 04:17
Person_photo_pragsmall

Bruno Kim Medeiros Cesar (4 posts)

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.

  1. 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]]
                     [hiccup "1.0.5"]
                     [ring-server "0.3.1"]
                     [org.clojure/tools.reader "0.7.10"]]
  1. 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.

  2. 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 :)

  You must be logged in to comment