lein ring server does not automatically rebuild

1.3k Views Asked by At

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

There are 1 best solutions below

0
On

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)