Rails 2.3.4 "Template missing" when using haml

How to make it work?

I have an index.html.haml and index.html.erb file. erb works, and then when I delete erb, it gives me an error pattern.

I have rails 2.3.4 and a haml gem is installed.

"Template missing. Invalid template profiles /index.erb in view / views of view path"

+3
source share
2 answers

You will also need to run haml --rails yourproject, which will install the initializer in vender/plugins/haml.

+3
source

Add config.gem "haml"to your block Rails::Initializer.runin the envrionment.rb file. Old haml --rails yourprojectdisappears.

+4

Source: https://habr.com/ru/post/1744690/


All Articles