Scalate pre_compile

52 views
Skip to first unread message

Sébastien Druon

unread,
May 18, 2011, 11:22:35 AM5/18/11
to sca...@googlegroups.com
Hello!

When I use the precompile option of the maven plugin, the templates get compiled without a problem.

I have problems with partials, though, which scalate cannot find anymore:
Could not load resource: [contacts_main_en.mustache]; are you sure it's within [/var/cache/jetty/data/Jetty_192_168_0_200_5139_root.war___.pn4zet/webapp]? 

where contacts_main_en.mustache is a partial template of contacts_en.mutache which is loaded correctly.

Any idea what the problem could be?

Thanks a lot in advance

Sébastien Druon

Sébastien Druon

unread,
Jun 6, 2011, 4:50:39 AM6/6/11
to sca...@googlegroups.com
Hello!

Anyone any idea?

Regards,

Sébastien

James Strachan

unread,
Jun 9, 2011, 3:46:38 AM6/9/11
to sca...@googlegroups.com
Sorry for the delay replying Sébastien! A combination of being snowed
for CamelOne conference then vacation...

This maybe sounds like a bug; I wonder if the maven compile plugin
isn't detecting the partial for some reason. I've raised an issue to
track it...
https://www.assembla.com/spaces/scalate/support/tickets/247

--
James
-------
FuseSource
Email: ja...@fusesource.com
Web: http://fusesource.com
Twitter: jstrachan, fusenews
Blog: http://macstrac.blogspot.com/

Open Source Integration and Messaging

sdb

unread,
Jun 10, 2011, 10:36:15 AM6/10/11
to Scalate
i'm experiencing similar problems when i use the precompiler. in my
case, with layouts. i'm using 1.6.0-SNAPSHOT and SSP templates.

my templates are in a scalate dir under the source/main/webapp dir.
this scalate dir contains 2 subdirs: layouts and templates.

it seems that when i use relative paths in my templates (which are
stored under webapp/scalate/templates), like this:

<% layout("../layouts/base.ssp") { %>

it doesn't find the precompiled template, and so i guess it will try
to compile this template, which doesn't work since i don't include the
scala compiler in production.

but when i change it to this:

<% layout("scalate/layouts/base.ssp") { %>

it just works.

so it might be that referencing templates with relative paths might be
broken. i'm sure that relative paths work when i don't precompile and
let scalate compile at runtime, cause that's what i do in development
mode.

i'll get back on this and add a stacktrace and maybe a patch if i can
find what's wrong.

Thanks,
Stefan De Boey


On Jun 9, 9:46 am, James Strachan <ja...@fusesource.com> wrote:
> Sorry for the delay replying Sébastien! A combination of being snowed
> for CamelOne conference then vacation...
>
> This maybe sounds like a bug; I wonder if the maven compile plugin
> isn't detecting the partial for some reason. I've raised an issue to
> track it...https://www.assembla.com/spaces/scalate/support/tickets/247
Reply all
Reply to author
Forward
0 new messages