Message from discussion
Is anybody using partials with locals?
MIME-Version: 1.0
Received: by 10.100.231.16 with SMTP id d16mr524549anh.20.1220555477143; Thu,
04 Sep 2008 12:11:17 -0700 (PDT)
Date: Thu, 4 Sep 2008 12:11:17 -0700 (PDT)
In-Reply-To: <f2ce72b0809040441y2f24a1f3lce11623237ede931@mail.gmail.com>
X-IP: 69.28.122.206
References: <3458bd1d-78bf-4879-8085-067d301fcead@v39g2000pro.googlegroups.com>
<f2ce72b0809040441y2f24a1f3lce11623237ede931@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1)
Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe)
Message-ID: <4040cb21-239c-4340-86a8-741ddd5431e8@o40g2000prn.googlegroups.com>
Subject: Re: Is anybody using partials with locals?
From: lyqwyd <agbod...@gmail.com>
To: StaticMatic <staticmatic@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
I did see that thread, but I was hoping progress had been made since
then... Where would I set staticmatic to use haml 1.8.3? I cannot
uninstall haml 2.0.2 as I have other rails & merb projects using that.
Just curious, is staticmatic still an ongoing project? It looks like
there hasn't been a release in a while and the staticmatic 2 page on
github shows last commit was around mid July.
Thanks!
On 4 Sep, 04:41, "Ryan McGeary" <ryan.mcge...@gmail.com> wrote:
> I haven't touched staticmatic stuff in a little while but the last time I
> checked, the only stable version combination was staticmatic 0.9.3 and ha=
ml
> 1.8.2.
> See this thread:http://groups.google.com/group/staticmatic/browse_thread/=
thread/62840...
>
> -Ryan
>
> On Wed, Sep 3, 2008 at 11:57 PM, lyqwyd <agbod...@gmail.com> wrote:
>
> > I tried using partials with 0.9.4 with locals and it dies. Looks like
> > 0.9.4 is not compatible with haml 2+. I tried using staticmatic 2 from
> > git and the preview won't even load, it says there's an error on:
>
> > $ rake preview --
> > trace
> > (in mysite)
> > ** Invoke preview (first_time)
> > ** Execute preview
> > rake aborted!
> > ./staticmatic/lib/tasks/../staticmatic/previewer.rb:31: syntax error,
> > unexpected '\n'
> > ./staticmatic/lib/tasks/staticmatic.rb:8
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `call'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:546:in `execute'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `each'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:541:in `execute'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:508:in
> > `invoke_with_call_chain'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
> > `synchronize'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:501:in
> > `invoke_with_call_chain'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:494:in `invoke'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1931:in
> > `invoke_task'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `each'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1909:in `top_level'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
> > `standard_exception_handling'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1903:in `top_level'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1881:in `run'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1948:in
> > `standard_exception_handling'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1878:in `run'
> > /Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31
> > /usr/bin/rake:19:in `load'
> > /usr/bin/rake:19
> > staticmatic/lib/staticmatic/previewer.rb line
>
> > which looks to be the ternary operator on several lines:
>
> > =A0 =A0output =3D (file_ext =3D=3D "css") ?
> > =A0 =A0 =...@staticmatic.render(path_info)
> > =A0 =A0 =...@staticmatic.render_with_layout(file_name)
>
> > so I tried changing it to:
>
> > =A0 =A0output =3D (file_ext =3D=3D "css") ? @staticmatic.render(path_in=
fo) :
> > @staticmatic.render_with_layout(file_name)
>
> > which then allowed rake preview to work... with the odd message (note
> > that there is no port):
>
> > =A0 =A0** Invoke preview (first_time)
> > =A0 =A0** Execute preview
> > =A0 =A0Running Preview of . on port
>
> > but when I try to access a page with a partial I get the error (on the
> > actual web page, after the preceding haml content is properly
> > rendered):
>
> > undefined method `controller_path' for StaticMatic::Base:Class
>
> > ---
> > =A0 =A0- |-
> > =A0 =A0 =A0On line #1 of mysite/src/pages/test.haml
>
> > =A0 =A0 =A0 =A0 =A01: =3D render :partial =3D> "sidebar"
>
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > partial_template.rb:60:in `partial_pieces'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > partial_template.rb:52:in `extract_partial_name_and_path'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > partial_template.rb:7:in `initialize'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > partials.rb:110:in `new'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > partials.rb:110:in `render_partial'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > base.rb:273:in `render_without_haml'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/haml-2.0.2/lib/haml/help=
ers/
> > action_view_mods.rb:5:in `render'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/haml-2.0.2/lib/haml/help=
ers.rb:
> > 57:in `non_haml'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/haml-2.0.2/lib/haml/help=
ers/
> > action_view_mods.rb:5:in `render'
> > =A0 =A0 =A0 =A0 =A0src/pages/test.haml:1:in
>
> > `_run_plugin_47Users47afam47workspace47static47nursing47trunk47src47pag=
es47test46haml'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > base.rb:338:in `send'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > base.rb:338:in `execute'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > template_handlers/compilable.rb:29:in `send'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > template_handlers/compilable.rb:29:in `render'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > template.rb:35:in `render'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > template.rb:22:in `render_template'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/actionpack-2.1.0/lib/act=
ion_view/
> > base.rb:245:in `render_file'
> > =A0 =A0 =A0 =A0 =A0staticmatic/lib/staticmatic/base.rb:58:in `render'
> > =A0 =A0 =A0 =A0 =A0staticmatic/lib/staticmatic/base.rb:67:in
> > `render_with_layout'
> > =A0 =A0 =A0 =A0 =A0staticmatic/lib/staticmatic/previewer.rb:30:in `proc=
ess'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l/
> > http_response.rb:65:in `start'
> > =A0 =A0 =A0 =A0 =A0staticmatic/lib/staticmatic/previewer.rb:25:in `proc=
ess'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 159:in `process_client'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 158:in `each'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 158:in `process_client'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 285:in `run'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 285:in `initialize'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 285:in `new'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 285:in `run'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 268:in `initialize'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 268:in `new'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l.rb:
> > 268:in `run'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l/
> > configurator.rb:282:in `run'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l/
> > configurator.rb:281:in `each'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l/
> > configurator.rb:281:in `run'
> > =A0 =A0 =A0 =A0 =A0staticmatic/lib/staticmatic/previewer.rb:57:in `cloa=
ker_'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l/
> > configurator.rb:50:in `call'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/mongrel-1.1.5/lib/mongre=
l/
> > configurator.rb:50:in `initialize'
> > =A0 =A0 =A0 =A0 =A0staticmatic/lib/staticmatic/previewer.rb:51:in `new'
> > =A0 =A0 =A0 =A0 =A0staticmatic/lib/staticmatic/previewer.rb:51:in `star=
t'
> > =A0 =A0 =A0 =A0 =A0staticmatic/lib/tasks/staticmatic.rb:8
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:5=
46:in
> > `call'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:5=
46:in
> > `execute'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:5=
41:in
> > `each'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:5=
41:in
> > `execute'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:5=
08:in
> > `invoke_with_call_chain'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:5=
01:in
> > `synchronize'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:5=
01:in
> > `invoke_with_call_chain'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:4=
94:in
> > `invoke'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
931:in
> > `invoke_task'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
909:in
> > `top_level'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
909:in
> > `each'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
909:in
> > `top_level'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
948:in
> > `standard_exception_handling'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
903:in
> > `top_level'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
881:in
> > `run'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
948:in
> > `standard_exception_handling'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/lib/rake.rb:1=
878:in
> > `run'
> > =A0 =A0 =A0 =A0 =A0/Library/Ruby/Gems/1.8/gems/rake-0.8.1/bin/rake:31
> > =A0 =A0 =A0 =A0 =A0/usr/bin/rake:19:in `load'
> > =A0 =A0 =A0 =A0 =A0/usr/bin/rake:19
>