views:

74

answers:

1

Hey there,

i have tried to render some files with HAML in Rails 3. But HAMl doesn`t work.

My testfiles have the extension .html.haml. In the GEMFile i have written gem 'haml' and executed the bundle install

When i call my testapp i become an error like this: 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"

Hope, i become some help here.

Peter

A: 

HAML does work without issue in Rails 3.. Two things:

  1. Make sure your route file has resources :posts
  2. Make sure you have the file app/views/posts/index.html.haml

Could you try that? And confirm that Andrew's comment about restarting Rails has been tried as well.

Jesse Wolgamott
I don`t know why, but now it`s working ;9Thx for your answer
Peter