How do I get Haml to work with Rails?

24hourCoder picture 24hourCoder · Sep 19, 2008 · Viewed 54.6k times · Source

I am trying to get Haml to work with my Ruby on Rails project. I am new to Ruby on Rails and I really like it. However, when I attempt to add an aplication.html.haml or index.html.haml for a view, I just receive errors.

I am using NetBeans as my IDE.

Answer

kch picture kch · May 22, 2010

Haml with Rails 3

For Rails 3 all you need to do is add gem "haml", '3.0.25' to your Gemfile. No need to install plugin or run haml --rails ..

Just:

$ cd awesome-rails-3-app.git
$ echo 'gem "haml"' >> Gemfile

And you're done.