Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HAML on Rails 3 returning "Template is missing" error

Tags:

I have tried to render some files with HAML in Rails 3 without success.

My testfiles have the extension .html.haml.

In my Gemfile, I have the line gem 'haml' and have run bundle install.

When I run my app, I get the following error:

Template is missing

Missing template posts/index with {:locale=>[:en, :en], :formats=>[:html], :handlers=>[:rjs, :rhtml, :rxml, :builder, :erb]} in view paths "/Users/piet/Sites/blog/app/views"`

Any idea on how to resolve this?

like image 676
Peter Avatar asked Sep 25 '10 20:09

Peter


1 Answers

For rails 3 all you need to do is add:

gem "haml-rails"

to your Gemfile, then do a "bundle install"

See https://github.com/indirect/haml-rails

If you still seeing the error try restarting your server.

like image 72
Greg Fairbrother Avatar answered Sep 24 '22 07:09

Greg Fairbrother