2
我正在使用rails版本3.2.12,并为我的视图使用.erb模板。application.html.haml未呈现
现在我想开始使用haml模板。
我将haml和haml-rails添加到gem文件并安装了该软件包。
Using haml (4.0.0)
Installing haml-rails (0.4)
我已经做了模拟式application.html.haml
!!! 5
%html
%head
%title Rotten Potatoes!
= stylesheet_link_tag 'application'
= javascript_include_tag 'application'
= csrf_meta_tags
%body
= yield
我再变application_controller.rb到
class ApplicationController < ActionController::Base
layout "application"
protect_from_forgery
include SessionsHelper
end
当我运行此我得到以下错误消息: 使用{:locale => [:en],:formats => [:html],:handlers => [:erb,:builder,:coffee]}缺少模板布局/应用程序。搜索:*“/ home/coen/Desktop/rails_project/sample_app/app/views”
好像haml处理程序没有安装。
我该如何做到这一点?
阿嘎,我讨厌它什么时候可以想到自己的答案:) 感谢一个捆绑队友! – MPL 2013-03-17 22:52:30