我從來沒有在我的應用程序管理頁面的問題之前,但在我的機器重新啓動後,我得到這個錯誤:突然我的管理頁面不會加載Padrino(模板引擎未找到)
RuntimeError at /admin/sessions/new
Template engine not found: /sessions/new
有了這個縮寫回溯:在app.rb
/Users/jeremysmith/code/robusto_server/admin/controllers/sessions.rb in block (2 levels) in <top (required)>
render "/sessions/new", nil, :layout => false
/Users/jeremysmith/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/webrick/httpserver.rb in service
si.service(req, res)
一切都是相同的,因爲它是當這曾經工作:
set :login_page, "/admin/sessions/new"
enable :sessions
disable :store_location
access_control.roles_for :any do |role|
role.protect "/"
role.allow "/sessions"
end
access_control.roles_for :admin do |role|
role.project_module :stat_definitions, "/stat_definitions"
role.project_module :accounts, "/accounts"
end
哇
更多信息,十分感謝。你有什麼想法,爲什麼它以前工作,或爲什麼它隨機停止工作?我的app.rb從來沒有這條線.. –
因爲這樣你就可以使用你真正需要的東西。所以如果有必要,你可以採取一個乾淨的項目 – DAddYE