StaticMatic::TemplateError

20 views
Skip to first unread message

LessAllan

unread,
Aug 20, 2010, 11:29:34 AM8/20/10
to StaticMatic
I have partials setup and staticmatic says they're not in the app.
I've built and previewed the app several times.

= partial('proposals/test')

--------
Here's a screen capture
http://screencast.com/t/ZWMxZGE2MGQt
-------


StaticMatic::TemplateError in ./src/pages/index.haml

proposals/proposals, line : Partial not found

1: #tabs-1
2: = partial('proposals/proposals')
3: #tabs-2
4: = partial('proposals/proposals')
5: #tabs-3
Backtrace

/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/mixins/render.rb:
75:in `generate_partial'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/helpers.rb:192:in
`partial'
(haml):2:in `render'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/haml-3.0.15/lib/haml/
engine.rb:178:in `render'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/haml-3.0.15/lib/haml/
engine.rb:178:in `instance_eval'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/haml-3.0.15/lib/haml/
engine.rb:178:in `render'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/mixins/render.rb:
112:in `generate_html_from_template_source'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/mixins/render.rb:
26:in `generate_html'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/mixins/render.rb:
40:in `generate_html_with_layout'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/server.rb:33:in
`call'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/rack-1.1.0/lib/rack/
showexceptions.rb:24:in `call'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/rack-1.1.0/lib/rack/
builder.rb:77:in `call'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/rack-1.1.0/lib/rack/
content_length.rb:13:in `call'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/rack-1.1.0/lib/rack/
handler/webrick.rb:48:in `service'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
httpserver.rb:104:in `service'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
httpserver.rb:65:in `run'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
server.rb:173:in `start_thread'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
server.rb:162:in `start'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
server.rb:162:in `start_thread'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
server.rb:95:in `start'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
server.rb:92:in `each'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
server.rb:92:in `start'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
server.rb:23:in `start'
/Users/allanbranch/.rvm/rubies/ruby-1.8.7-p174/lib/ruby/1.8/webrick/
server.rb:82:in `start'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/rack-1.1.0/lib/rack/
handler/webrick.rb:14:in `run'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/server.rb:52:in
`start'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/mixins/server.rb:
4:in `preview'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/base.rb:71:in `send'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/../lib/staticmatic/base.rb:71:in `run'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/gems/
staticmatic-0.11.0.alpha.8/bin/staticmatic:16
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/bin/staticmatic:19:in
`load'
/Users/allanbranch/.rvm/gems/ruby-1.8.7-p174/bin/staticmatic:19

Eric D. Fields

unread,
Aug 20, 2010, 11:50:02 AM8/20/10
to stati...@googlegroups.com
I couldn't get partials to work from within a sub-directory like that either. They work fine in the /partials directory tho.


--
You received this message because you are subscribed to the Google Groups "StaticMatic" group.
To post to this group, send email to stati...@googlegroups.com.
To unsubscribe from this group, send email to staticmatic...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/staticmatic?hl=en.




--
eric

Stephen Bartholomew

unread,
Aug 20, 2010, 1:40:04 PM8/20/10
to StaticMatic
Hey Allen,

Partials can be in src/partials/_my_partial or src/pages/my_partial.
You can also use sub-directories, but they'll need to be in src/
partials or src/pages.

This isn't particularly clear from the docs. I'll make sure it's
clearer in the new (Coming Soon TM) documentation.

Let me know if you still get issues after moving the files around.

Steve


On Aug 20, 4:29 pm, LessAllan <al...@lesseverything.com> wrote:
> I have partials setup and staticmatic says they're not in the app.
> I've built and previewed the app several times.
>
> = partial('proposals/test')
>
> --------
> Here's a screen capturehttp://screencast.com/t/ZWMxZGE2MGQt

Martin

unread,
Aug 20, 2010, 1:41:46 PM8/20/10
to StaticMatic
I think the "proposals" directory should be inside either "partials"
or "pages" in order to work.

Nice screencast, btw.
> > staticmatic...@googlegroups.com<staticmatic%2Bunsubscribe@googlegr oups.com>
> > .
Reply all
Reply to author
Forward
0 new messages