Auto-reloading Templates

117 views
Skip to first unread message

Dar Montou

unread,
Nov 5, 2013, 2:37:09 PM11/5/13
to enliv...@googlegroups.com
I haven't been able to get net.cgrand.reload/auto-reload to work and I noticed a few comments on GitHub indicating this is a problem for other users as well. 

What steps are required to use auto-reload?


Sven Richter

unread,
Jan 15, 2014, 2:35:23 PM1/15/14
to enliv...@googlegroups.com
I have the same problem.
I am using the latest enlive version with a luminus template on W7 with J7. Everything else works as expected. This is a bit annoying and keeps me from having the fun that i want to have.
Ok, that was no offense, i am just a little bit sorry that it doesnt work.

Would it make sense to open a new issue for this?

Best Regards,
Sven

Christophe Grand

unread,
Jan 16, 2014, 3:44:47 AM1/16/14
to enlive-clj
Yes, please open a new issue and add a maximu of details about your env.

Thanks,

Christophe


--
You received this message because you are subscribed to the Google Groups "Enlive" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enlive-clj+...@googlegroups.com.
To post to this group, send email to enliv...@googlegroups.com.
Visit this group at http://groups.google.com/group/enlive-clj.
For more options, visit https://groups.google.com/groups/opt_out.



--
On Clojure http://clj-me.cgrand.net/
Clojure Programming http://clojurebook.com
Training, Consulting & Contracting http://lambdanext.eu/

Dar Montou

unread,
Jan 16, 2014, 12:22:26 PM1/16/14
to enliv...@googlegroups.com, chris...@cgrand.net
I found that I had to use the wrap-reload ring middleware to get this to work. If you scroll near the bottom of my example web app you'll see how I had to use the middleware. Line #24 shows the auto-reload usage, and line 157 shows the top-level handler with the required middleware...

Sven Richter

unread,
Jan 16, 2014, 3:35:56 PM1/16/14
to enliv...@googlegroups.com, chris...@cgrand.net
Hi,

thank you for that hint. This is already enabled in dev mode.
I setup an issue: https://github.com/cgrand/enlive/issues/92
and a small working example: https://github.com/sveri/enlive_http_kit
where you can see that it is enabled here: https://github.com/sveri/enlive_http_kit/blob/master/src/enlive_http_kit/core.clj

Best Regards,
Sven

Dar Montou

unread,
Jan 16, 2014, 7:14:06 PM1/16/14
to enliv...@googlegroups.com, chris...@cgrand.net
I wasn't able to get this to work using lein run -dev, but it appears to work as expected if the Cider REPL is connected to the relevant namespace (image attached). Also, I tested against a Linux server, so the issue is not isolated to Windows as was noted in issue #92.

Dar
EnliveIssue92_Auto_Reload_1.jpeg

Sven Richter

unread,
Jan 17, 2014, 3:36:06 AM1/17/14
to enliv...@googlegroups.com, chris...@cgrand.net
Hi Dar,

thank you for investigating in this :-) And good to see this issue is OS independent.
However, having lighttable and cursive at hand I am afraid i dont wanna go the emacs route right now.

Best Regards,
Sven
Reply all
Reply to author
Forward
0 new messages