Hello, John!
I have the following app configuration:
(def app
(middleware/app-handler
[rest-api-routes]
:middleware [json/wrap-json-body (dieter/asset-pipeline {:engine :rhino
:compress true
:asset-roots ["resources/public"]
:cache-root "data/cache"
:cache-mode :production
:log-level :normal})]
:access-rules []
:formats [:json-kw]))
As we see directory for cache should be "data/cache", but dieter tries to use directory "resources/asset-cache" for caching:
Exception in thread "main" java.lang.Exception: Directory does not exist: resources/asset-cache, compiling:(handler.clj:32:38)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3463)
at clojure.lang.Compiler$VectorExpr.eval(Compiler.java:2999)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3457)
at clojure.lang.Compiler$DefExpr.eval(Compiler.java:408)
at clojure.lang.Compiler.compile1(Compiler.java:7153)
at clojure.lang.Compiler.compile(Compiler.java:7219)
at clojure.lang.RT.compile(RT.java:398)
at clojure.lang.RT.load(RT.java:438)
at clojure.lang.RT.load(RT.java:411)
at clojure.core$load$fn__5018.invoke(core.clj:5530)
at clojure.core$load.doInvoke(core.clj:5529)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invoke(core.clj:5336)
at clojure.core$compile$fn__5023.invoke(core.clj:5541)
at clojure.core$compile.invoke(core.clj:5540)
at user$eval19.invoke(form-init4584691794925263205.clj:1)
at clojure.lang.Compiler.eval(Compiler.java:6619)
at clojure.lang.Compiler.eval(Compiler.java:6609)
at clojure.lang.Compiler.load(Compiler.java:7064)
at clojure.lang.Compiler.loadFile(Compiler.java:7020)
at clojure.main$load_script.invoke(main.clj:294)
at clojure.main$init_opt.invoke(main.clj:299)
at clojure.main$initialize.invoke(main.clj:327)
at clojure.main$null_opt.invoke(main.clj:362)
at clojure.main$main.doInvoke(main.clj:440)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at clojure.lang.AFn.applyToHelper(AFn.java:163)
at clojure.lang.Var.applyTo(Var.java:532)
at clojure.main.main(main.java:37)
Caused by: java.lang.Exception: Directory does not exist: resources/asset-cache
at ring.middleware.file$ensure_dir.invoke(file.clj:12)
at ring.middleware.file$wrap_file.doInvoke(file.clj:22)
at clojure.lang.RestFn.invoke(RestFn.java:425)
at dieter.core$asset_pipeline.doInvoke(core.clj:71)
at clojure.lang.RestFn.invoke(RestFn.java:410)
at clojure.lang.AFn.applyToHelper(AFn.java:161)
at clojure.lang.RestFn.applyTo(RestFn.java:132)
at clojure.lang.Compiler$InvokeExpr.eval(Compiler.java:3458)
... 29 more
Compilation failed: Subprocess failed
Maybe I did something wrong.. Have you got any idea?
Hello, John!
I have the following app configuration:
As we see directory for cache should be "data/cache", but dieter tries to use directory "resources/asset-cache" for caching:
Maybe I did something wrong.. Have you got any idea?