How to use haml


#1

I’m working on a proposal for my work using hanami, but we use haml; the instructions say just require ‘haml’, but it isn’t clear where. Just writing a simple news blog, I’ve added it to the view and get the following error when rendered:

/home/brett/work/motif/apps/web/views/news_blog/index.rb:1:in `require’: cannot load such file – haml (LoadError)


#2

@ebrett Hi and thanks for giving Hanami a try!

This entry in your Gemfile should be enough.

gem 'haml' 

Otherwise you can explicitly require it from lib/<your-project-name>.rb

Does this solves your issue?


#3

indeed it did! I thought it was already included in Hanami, so I didn’t think of that.

thanks!