tmichel / offline-blog

Offline blog for your inner thoughts which do no belong on the internet.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not commited entry throws an error

tmichel opened this issue · comments

Visiting a not commited entry throws an error. Stacktrace below:

NoMethodError - undefined method `[]' for nil:NilClass:
    /home/tomi/p/blog/lib/web/post.rb:60:in `raw_date'
    /home/tomi/p/blog/lib/web/post.rb:26:in `date'
    /home/tomi/p/blog/lib/web/views/post.erb:5:in `block in singletonclass'
    /home/tomi/p/blog/lib/web/views/post.erb:65531:in `instance_eval'
    /home/tomi/p/blog/lib/web/views/post.erb:65531:in `singletonclass'
    /home/tomi/p/blog/lib/web/views/post.erb:65529:in `__tilt_22303100'
    /home/tomi/.gem/ruby/1.9.3/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/tilt-1.4.1/lib/tilt/template.rb:170:in `evaluate'
    /home/tomi/.gem/ruby/1.9.3/gems/tilt-1.4.1/lib/tilt/template.rb:103:in `render'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:798:in `render'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:657:in `erb'
    /home/tomi/p/blog/lib/web/app.rb:21:in `block in <top (required)>'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1540:in `block in compile!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `[]'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (3 levels) in route!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:966:in `route_eval'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:950:in `block (2 levels) in route!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:987:in `block in process_route'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `catch'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:985:in `process_route'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:948:in `block in route!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `each'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:947:in `route!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1059:in `block in dispatch!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1056:in `dispatch!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `block in call!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `block in invoke'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `catch'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1041:in `invoke'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:882:in `call!'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:870:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-protection-1.5.0/lib/rack/protection/xss_header.rb:18:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-protection-1.5.0/lib/rack/protection/path_traversal.rb:16:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-protection-1.5.0/lib/rack/protection/json_csrf.rb:18:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-protection-1.5.0/lib/rack/protection/base.rb:49:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-protection-1.5.0/lib/rack/protection/frame_options.rb:31:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-1.5.2/lib/rack/logger.rb:15:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-1.5.2/lib/rack/commonlogger.rb:33:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:212:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:205:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-1.5.2/lib/rack/head.rb:11:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:175:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1949:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `block in call'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1726:in `synchronize'
    /home/tomi/.gem/ruby/1.9.3/gems/sinatra-1.4.3/lib/sinatra/base.rb:1449:in `call'
    /home/tomi/.gem/ruby/1.9.3/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in `service'
    /home/tomi/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/webrick/httpserver.rb:138:in `service'
    /home/tomi/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/webrick/httpserver.rb:94:in `run'
    /home/tomi/.rubies/ruby-1.9.3-p448/lib/ruby/1.9.1/webrick/server.rb:191:in `block in start_thread'
127.0.0.1 - - [22/Sep/2013 23:48:33] "GET /entry/014 HTTP/1.1" 500 30 0.3138
127.0.0.1 - - [22/Sep/2013:23:48:33 CEST] "GET /entry/014 HTTP/1.1" 500 30