sinatra-authentication gem not looking for correct views?
I am attempting to write a small blogging engine for myself in sinatra and mongoid and am trying to use the sinatra-authentication gem to do login/out.
I have gotten sinatra, mongoid, and haml all working but when I visit any sinatra-authentication page nginx throws an internal server error.
this is the error I am getting
Errno::ENOENT - No such file or directory - /opt/nginx/html/raptor.patrickarlt.com/views/layout.haml:
you can see all my files including more from my nginx 开发者_Python百科error log here https://gist.github.com/854156
get '/' works confirming Sinatra is working
get '/haml' works confirming haml is working get '/private' redirects to '/login' confirming sinatra-authentication is working get '/login' internal server errorRuby 1.9.2
Nginx 0.8.54 Passenger 3.0.2sinatra-authentication
assumes you're using a layout unless the current request is an XMLHttpRequest (see the code). You have two options:
- Create a layout for your application in
views/layout.haml
as described a couple paragraphs down at http://sinatra-book.gittr.com/#templates Override sinatra-authentication's
use_layout?
method as such:module Sinatra module Helpers def use_layout? false end end end
精彩评论