0

Before I start, I'd like to stress that I've looked for answers and I've tried to solve the issues by myself.

I have 2 types of controllers -

  1. A controller with a set of methods that render JSON - works perfectly

  2. A controller that actually renders HTML

This code is working perfectly on my local machine and the problem that I have with the second controller is on my production machine.

I've added 755 permissions to all my files but my file owner is the only user on my server which is "root". I've added the files to the www-data group though.

My controller is simple.

class AdministratorController < ApplicationController
  def login

  end
end

And my file is views/administrator/login.html.haml.

I'm getting an error -

ActionView::MissingTemplate (Missing template administrator/login, application/login with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder]}. Searched in:

* "/var/www/sitename/app/views" ):

4

2 回答 2

0

问题已解决。我不确定模板到底出了什么问题,但我开始看到与编译资产有关的不同错误。我刚刚重新编译了资产并重新启动了服务器。感谢你的帮助!

于 2013-05-06T05:44:55.020 回答
0

尝试添加到您的 Gemfile

gem 'haml-rails'

并运行bundle install

于 2013-05-06T04:40:12.637 回答