Hi,
I have a custom haml filter defined in my app. Shortly after I
upgraded Rails to 2.2.1 it stopped working in production; I don't know
if there's a connection. It still works fine in development.
I'm using haml 2.0.4, rdiscount 1.2.11 and rails 2.2.1.
My filter is in lib/smarty_pants.rb:
module Haml
module Filters
# Forces RDiscount to process with Smarty Pants.
module SmartyPants
include ::Haml::Filters::Base
lazy_require 'rdiscount'
def render(text)
::RDiscount.new(text, :smart).to_html
end
end
end
end
And the last line of my config/environment.rb is:
require 'smarty_pants'
In my mongrel logs, I see this error:
Filter "smartypants" is not defined. (Haml::Error)
from /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/haml/
precompiler.rb:711:in `start_filtered'
from /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/haml/
precompiler.rb:217:in `process_line'
from /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/haml/
precompiler.rb:152:in `precompile'
from /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/haml/
precompiler.rb:734:in `each_with_index'
from /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/haml/
precompiler.rb:118:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/haml/
precompiler.rb:118:in `each_with_index'
from /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/haml/
precompiler.rb:118:in `precompile'
from /usr/local/lib/ruby/gems/1.8/gems/haml-2.0.4/lib/haml/engine.rb:
100:in `initialize'
Can anybody see what I'm doing wrong?
Thanks in advance,
Andy Stewart
----
http://airbladesoftware.com
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---