Ah, I see. That's actually been fixed in the current stable branch, and 
will be included in the next incremental gem release we make. Thanks for 
pointing it out, though.

- Nathan

jt wrote:
> Well, you just need to /not/ include active_support ;-)
>
> Here is "test.rb":
>
> require 'haml'
>
> content = ".my_class= 'my_string'"
> engine = Haml::Engine.new(content)
> puts engine.render
>
> and its output:
>
> /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:712:in
> `render_tag': undefined method `first' for "'my_string'":String
> (NoMethodError)
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 702:in `scan'
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 702:in `render_tag'
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 792:in `render_div'
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 310:in `process_line'
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 254:in `do_precompile'
>         from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:
> 33:in `each_with_index'
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 229:in `each'
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 229:in `each_with_index'
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 229:in `do_precompile'
>         from /usr/lib/ruby/gems/1.8/gems/haml-1.7.0/lib/haml/engine.rb:
> 173:in `initialize'
>         from test.rb:4:in `new'
>         from test.rb:4
>
>
>
>
> On Aug 8, 9:39 am, Nathan Weizenbaum <[EMAIL PROTECTED]> wrote:
>   
>> ActiveSupport should /not/ be a dependency of Haml. I don't have easy
>> access to a machine without ActiveSupport installed; what happens when
>> you try to run Haml without it?
>>
>> - Nathan
>>
>> jt wrote:
>>     
>>> Hi,
>>>       
>>> I just tried haml, that's cool.
>>> I noticed that activesupport is required but this requirement is not
>>> documented (as well as other possible dependencies). If you want to
>>> use haml outside of rails there should be a small example that shows
>>> that you need to "require 'active_support'" to do simple things as
>>> ".my_class= 'my_string'" .
>>>       
>>> My question is: for what else is active_support required? Should it be
>>> required for this simple expression ".myclass= 'my_string' +
>>> my_variable" ?
>>>       
>>> thanks
>>> --
>>> jt
>>>       
>
>
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
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