In my enviroment I have

  require "lib/string"


lib/string.rb is like this:

#encoding: utf-8
class String
  def downcase
    self.tr 'QWERTZUIOPASDFGHJKLYXCVBNMŠĐŽČĆ',
            'qwertzuiopasdfghjklyxcvbnmšđžčć'
  end
end

I need it to cast to lower case for special (Croatian characters).
That is causing the error. If I remove that require, it works as
expected.
Do you have any ideas why is this error ocurring?

Kresimir Bojcic


On May 24, 7:35 am, drKreso <[email protected]> wrote:
> Haml::Filters::Javascript
>
> I've tried it on my production machine - I get sameerror. So I don't
> think is't machine specific.
>
> Kreso
>
> On May 24, 5:16 am, Nathan Weizenbaum <[email protected]> wrote:
>
> > Very verystrange. 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:
> > > > > > > > Verystrange. 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::Errorin 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)
>
> > > > > > > > > > > > kboj...@kbojcic-laptop:~/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>
> > > > > > > > > > > > kboj...@kbojcic-laptop:~/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:
> > > > > > > > > > > > > > kboj...@kbojcic-laptop:~/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 theerrorFilter "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
> > > > > > > > > > > > > > > > > >   -...@ucestalost_po_rasvjetnom_mjestu.each 
> > > > > > > > > > > > > > > > > > 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]<haml%[email protected]>
> > > <haml%[email protected]<haml%[email protected]>
>
> > > > > <haml%[email protected]<haml%[email protected]>
> > > <haml%[email protected]<haml%[email protected]>
>
> > > > > > > <haml%[email protected]<haml%[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.

Reply via email to