It seems view layouts from engines where the controller is also present in the host app do not load in production, but load fine in development.
#Example# Github Repo
###working###
- ./script/server
- browse to http://localhost:3000/index
###not working###
- ./script/server -e production
- browse to http://localhost:3000/index
##Explanation## ###Host Application### app/controller/application_controller.rb app/views/layouts/ {empty} app/views/other_controller/index.html.haml @@@ haml %p content of app/view/other_controller/index.html.haml @@@
###Engine### vender/plugins/engine_name/app/controller/application_controller.rb vender/plugins/engine_name/app/controller/other_controller.rb @@@ ruby class OtherController < ApplicationController ... end @@@ vender/plugins/engine_name/app/views/layouts/application.html.haml @@@ ruby %h1 ApplicationController layouts content = yield @@@
###HTML output in production ### does not render the layouts @@@ ruby
content of app/view/other_controller/index.html.haml @@@
###HTML output in development ### renders the layouts @@@ ruby
content of app/view/other_controller/index.html.haml @@@