gizmo
gizmo copied to clipboard
the web template doesnt work on windows
hi
i followed the instructions to create a new app from template
in D:\www\ lein new gizmo-web gizmo cd gizmo lein run --config config/development.clj
and i get an error Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:>
another question i have is why doesn't lein run just work, why do i need to specify the config file?
You have to specify a config file because Gizmo is built with a thought about production usage. We encourage people to have configuration from the first steps, otherwise hardcoded things are way too difficult to get out of the way.
Could you paste a full stacktrace? Unfortunately I can't yield any information from that message you've posted.
Exception in thread "main" java.nio.file.InvalidPathException: Illegal char <:>
at index 2: /D:/www/gizmo/resources/templates/home/index.html
at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
at sun.nio.fs.WindowsPath.parse(WindowsPath.java:94)
at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:255)
at net.cgrand.reload$eval1632$fn__1633.invoke(reload.clj:49)
at clojure.lang.MultiFn.invoke(MultiFn.java:231)
at net.cgrand.reload$auto_reload.invoke(reload.clj:10)
at clojurewerkz.gizmo.core$register_snippet_reload.invoke(core.clj:36)
at gizmo.cli_entrypoint$_main.doInvoke(cli_entrypoint.clj:22)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:419)
at user$eval5.invoke(form-init1931840011807257674.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)
Looks like Enlive doesn't like the way path is given. But no, doesn't ring my bells. Unfortunately, I don't have Windows machine to try it out.
I had the same problems
I solved the Exception problem by making this change:
In line 22 of cli-entrypoint.clj
;;(register-snippet-reload "my-gizmo-web2")
Also I was able to run with "lein run" by making this change:
In line 17 of cli-entrypoint.clj
(load-config! (or (:config options) "config/development.clj")))
@JeffAtAtl this is most likely a problem with Enlive. Could you please try reproducing it without Gizmo?