Loading...

haml@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

[haml] Re: Strange error with :javascript filter (For the last 5 hours :)) drKreso Sun May 23 23:00:24 2010

Haml::Filters::Javascript

I've tried it on my production machine - I get same error. So I don't
think is't machine specific.

Kreso

On May 24, 5:16 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> Very very strange. How about this: '= h
> Haml::Filters.defined["javascript"].inspect'
>
> On Sun, May 23, 2010 at 1:08 PM, drKreso <[EMAIL PROTECTED]> wrote:
> > For that I get:
>
> > "Filter "javascript" is not defined."
>
> > On May 23, 1:29 pm, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> > > This just keeps getting weirder and weirder. How about this: try adding
> > '= h
> > > Haml::Engine.new(":javascript\n  test").render' to your template and see
> > > what you get.
>
> > > On Sun, May 23, 2010 at 2:09 AM, drKreso <[EMAIL PROTECTED]>
> > wrote:
> > > > I get this:
>
> > > > {"plain"=>Haml::Filters::Plain,
> > > > "javascript"=>Haml::Filters::Javascript, "css"=>Haml::Filters::Css,
> > > > "cdata"=>Haml::Filters::Cdata, "escaped"=>Haml::Filters::Escaped,
> > > > "ruby"=>Haml::Filters::Ruby, "preserve"=>Haml::Filters::Preserve,
> > > > "sass"=>Haml::Filters::Sass, "erb"=>Haml::Filters::ERB,
> > > > "textile"=>Haml::Filters::Textile, "redcloth"=>Haml::Filters::Textile,
> > > > "markdown"=>Haml::Filters::Markdown, "maruku"=>Haml::Filters::Maruku}
>
> > > > On May 23, 6:45 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> > > > > Very weird. What happens if you add "= h
> > Haml::Filters.defined.inspect"?
>
> > > > > On Sat, May 22, 2010 at 5:39 PM, drKreso <[EMAIL PROTECTED]>
> > > > wrote:
> > > > > > Nope. I've tried :plain and :markdown - same result.
>
> > > > > > On May 23, 2:37 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
> > > > > > > Very strange. Do other filters work?
>
> > > > > > > On Sat, May 22, 2010 at 5:29 PM, drKreso <
> > [EMAIL PROTECTED]>
> > > > > > wrote:
> > > > > > > > {:major=>3, :minor=>0, :teeny=>4, :name=>"Classy
> > > > > > > > Cassidy", :number=>"3.0.4", :string=>"3.0.4 (Classy Cassidy)"}
>
> > > > > > > > On May 23, 2:25 am, Nathan Weizenbaum <[EMAIL PROTECTED]>
> > wrote:
> > > > > > > > > I'm guessing that you have an old Haml installation in your
> > Rails
> > > > > > app. If
> > > > > > > > > you put "= h Haml.version.inspect" in your template, what do
> > you
> > > > get?
>
> > > > > > > > > On Sat, May 22, 2010 at 5:12 PM, drKreso <
> > > > [EMAIL PROTECTED]>
> > > > > > > > wrote:
> > > > > > > > > > But "same" thing over the firefox I get
>
> > > > > > > > > >  Haml::Error in Izvjestaji#ucestalost_po_rasvjetnom_mjestu
>
> > > > > > > > > > Showing
> > > > app/views/izvjestaji/ucestalost_po_rasvjetnom_mjestu.haml
> > > > > > > > > > where line #5 raised:
>
> > > > > > > > > > Filter "javascript" is not defined.
>
> > > > > > > > > > Extracted source (around line #5):
>
> > > > > > > > > > 2:  Pregled učestalosti kvarova po rasvjetnim mjestima
> > > > > > > > > > 3: -content_for :script do
> > > > > > > > > > 4:  =javascript_include_tag 'kvar_rasvjetno_mjesto.js'
> > > > > > > > > > 5: :javascript
> > > > > > > > > > 6:  $(function() {
> > > > > > > > > > 7:    $("table.mainTable tr").click(function () {
> > > > > > > > > > 8:      id = $(this).attr("id");
>
> > > > > > > > > > On May 23, 2:09 am, drKreso <[EMAIL PROTECTED]>
> > wrote:
> > > > > > > > > > > this 1.8 got me off the track, since I am using 1.9 ruby.
> > > > > > > > > > > I've installed it via gem install. This is what I get (It
> > > > works
> > > > > > > > > > > perfectly I think)
>
> > > > > > > > > > > [EMAIL PROTECTED]:~/gosjar$ haml
> > > > > > > > > > > :javascript
> > > > > > > > > > >  $(function() {
> > > > > > > > > > >    $("table.mainTable tr").click(function () {
> > > > > > > > > > >      id = $(this).attr("id");
> > > > > > > > > > >      prikaziRasvjetnoMjesto(id)
> > > > > > > > > > >    });
> > > > > > > > > > >  });
> > > > > > > > > > > <script type='text/javascript'>
> > > > > > > > > > >   //<![CDATA[
> > > > > > > > > > >     $(function() {
> > > > > > > > > > >       $("table.mainTable tr").click(function () {
> > > > > > > > > > >         id = $(this).attr("id");
> > > > > > > > > > >         prikaziRasvjetnoMjesto(id)
> > > > > > > > > > >       });
> > > > > > > > > > >     });
> > > > > > > > > > >   //]]>
> > > > > > > > > > > </script>
> > > > > > > > > > > [EMAIL PROTECTED]:~/gosjar$
>
> > > > > > > > > > > On May 23, 2:07 am, Nathan Weizenbaum <[EMAIL PROTECTED]>
> > > > wrote:
>
> > > > > > > > > > > > How do you have Haml installed in your project?
>
> > > > > > > > > > > > On Sat, May 22, 2010 at 5:03 PM, drKreso <
> > > > > > > > [EMAIL PROTECTED]>
> > > > > > > > > > wrote:
> > > > > > > > > > > > > [EMAIL PROTECTED]:~/gosjar$ haml
> > > > > > > > > > > > > The program 'haml' is currently not installed.  To
> > run
> > > > 'haml'
> > > > > > > > please
> > > > > > > > > > > > > ask your administrator to install the package
> > > > > > 'libhaml-ruby1.8'
>
> > > > > > > > > > > > > ?
>
> > > > > > > > > > > > > On May 23, 1:49 am, Nathan Weizenbaum <
> > [EMAIL PROTECTED]>
> > > > > > wrote:
> > > > > > > > > > > > > > If you have the Haml gem installed, you'll also
> > have a
> > > > > > "haml"
> > > > > > > > > > > > > command-line
> > > > > > > > > > > > > > utility. The simplest way to use it is to just run
> > > > "haml",
> > > > > > type
> > > > > > > > in
> > > > > > > > > > Haml
> > > > > > > > > > > > > > code, and press Ctrl-D. Then it'll spit out the
> > > > compiled
> > > > > > HTML.
>
> > > > > > > > > > > > > > On Sat, May 22, 2010 at 4:44 PM, drKreso <
> > > > > > > > > > [EMAIL PROTECTED]>
> > > > > > > > > > > > > wrote:
> > > > > > > > > > > > > > > Hey, thanks for response. How can I use it from
> > the
> > > > > > command
> > > > > > > > line?
>
> > > > > > > > > > > > > > > Best Regards,
>
> > > > > > > > > > > > > > > Kreso
>
> > > > > > > > > > > > > > > On May 23, 12:55 am, Nathan Weizenbaum <
> > > > [EMAIL PROTECTED]
>
> > > > > > > > wrote:
> > > > > > > > > > > > > > > > Can you reproduce this using Haml from the
> > command
> > > > > > line?
>
> > > > > > > > > > > > > > > > On Fri, May 21, 2010 at 5:03 PM, drKreso <
> > > > > > > > > > [EMAIL PROTECTED]>
> > > > > > > > > > > > > > > wrote:
> > > > > > > > > > > > > > > > > I get the error Filter "javascript" is not
> > > > defined.
>
> > > > > > > > > > > > > > > > > Ruby 1.9.1, Rails 2.3.5, Haml 3.0.4
>
> > > > > > > > > > > > > > > > > Other filters are not working eather. (:plain
> > for
> > > > > > > > example).
> > > > > > > > > > If I
> > > > > > > > > > > > > put
> > > > > > > > > > > > > > > > > %script and  "unindent" JQUERY, everything
> > works
> > > > > > fine.
>
> > > > > > > > > > > > > > > > > Please help.
>
> > > > > > > > > > > > > > > > > -content_for :titlebar do
> > > > > > > > > > > > > > > > >  Pregled uèestalosti kvarova po rasvjetnim
> > > > mjestima
> > > > > > > > > > > > > > > > > -content_for :script do
> > > > > > > > > > > > > > > > >  =javascript_include_tag
> > > > 'kvar_rasvjetno_mjesto.js'
> > > > > > > > > > > > > > > > > :javascript
> > > > > > > > > > > > > > > > >  $(function() {
> > > > > > > > > > > > > > > > >   $("table.mainTable tr").click(function () {
> > > > > > > > > > > > > > > > >   id = $(this).attr("id");
> > > > > > > > > > > > > > > > >   prikaziRasvjetnoMjesto(id)
> > > > > > > > > > > > > > > > >  });
> > > > > > > > > > > > > > > > >  });
> > > > > > > > > > > > > > > > > %span#view-izvjestaj
> > > > > > > > > > > > > > > > >  %table#ucestalostTable.mainTable
> > > > > > > > > > > > > > > > >  %thead
> > > > > > > > > > > > > > > > >   %tr.ui-widget-header
> > > > > > > > > > > > > > > > >    %th Broj kvarova
> > > > > > > > > > > > > > > > >    %th Oznaka
> > > > > > > > > > > > > > > > >    %th Tip stupa
> > > > > > > > > > > > > > > > >    %th Visina
> > > > > > > > > > > > > > > > >    %th Lokacija
> > > > > > > > > > > > > > > > >  %tbody
> > > > > > > > > > > > > > > > >   [EMAIL PROTECTED] do
> > > > |item|
> > > > > > > > > > > > > > > > >    %tr{:id => item.id}
> > > > > > > > > > > > > > > > >     %td= item.broj_kvarova
> > > > > > > > > > > > > > > > >     %td= item.oznaka
> > > > > > > > > > > > > > > > >     %td= item.tip_stupa_naziv
> > > > > > > > > > > > > > > > >     %td= item.visina
> > > > > > > > > > > > > > > > >     %td= item.ulica.lokacija
> > > > > > > > > > > > > > > > > %br
> > > > > > > > > > > > > > > > >  %img{:src =>'/izvjestaji/
> > > > > > > > > > > > > > > > > ucestalost_po_rasvjetnom_mjestu_graf' ,
> > :style
> > > > > > > > =>'border:1px
> > > > > > > > > > solid
> > > > > > > > > > > > > > > > > #aabcca;'}
>
> > > > > > > > > > > > > > > > > --
> > > > > > > > > > > > > > > > > You received this message because you are
> > > > subscribed
> > > > > > to
> > > > > > > > the
> > > > > > > > > > Google
> > > > > > > > > > > > > > > Groups
> > > > > > > > > > > > > > > > > "Haml" group.
> > > > > > > > > > > > > > > > > To post to this group, send email to
> > > > > > > > [EMAIL PROTECTED]
> > > > > > > > > > > > > > > > > To unsubscribe from this group, send email to
> > > > > > > > > > > > > > > > > [EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> > > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> > > > > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> > > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> > > > > > > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> > > > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > <[EMAIL PROTECTED]<[EMAIL PROTECTED]>
>
> ...
>
> read more »

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en.