1
votes

I am writing a small clojurescript project and I followed the numerous lein cljsbuild examples that use lein ring as a development web server.

I used to run lein ring server to serve the website on my local machine. Now it seems that lein ring server does not automatically rebuild and restart when I change the clj files that contain the hiccup html definitions.

According to https://github.com/weavejester/lein-ring this should be the case (maybe I have misread, but it says that reloading should be the default).

My project.cljs is more or less equivalent to https://github.com/emezeske/lein-cljsbuild/blob/master/example-projects/advanced/project.clj

Any ideas?

1
Have you tried setting auto-reload? to true? - Cubic
I did ` :ring {:auto-reload? true ...` though I have no confirmation that this is the right invocation. - wirrbel
I have just increased the version numbers of all clojar packages in the leiningen project file and now it seems to work. - wirrbel

1 Answers

-1
votes

I've had the same problem and ends up the cause was that I was requiring a library before declaring the namespace, requiring it the line below the namespace made it work. So it was like:

(require 'clojure.pprint)
(ns app.core)

and I changed to:

(ns app.core)
(require 'clojure.pprint)