Search code examples
ruby-on-railshamlrails-engines

Haml in Rails Engine


I am developing Rails engine that uses HAML for views templates. So my gemspec has following: line

  s.add_runtime_dependency 'haml', ">= 3.0.18"

But when I use this gem in an application that does not use HAMl itself, HAML does not seem to be initialized (though Gemfile.lock clearly states that it is in dependencies).

Should I add some HAML initialization in the engine code ?


Solution

  • I faced same issue. Fixed by requiring haml in engine.rb

    require 'haml'