kemalcr / kemal

Fast, Effective, Simple Web Framework

Home Page:https://kemalcr.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error: undefined method 'modification_time' for Kemal::StaticFileHandler (Crystal 1.6.0)

petr-fischer opened this issue · comments

Hello, latest kemal (1.2.0) started to complain something about Kemal::StaticFileHandler, I am lost a little...

# --- strip ---

In /usr/share/crystal/src/http/server/handler.cr:28:20

 28 | next_handler.call(context)
                   ^---
Error: instantiating '(HTTP::Handler | Proc(HTTP::Server::Context, Nil))#call(HTTP::Server::Context)'


In lib/kemal/src/kemal/static_file_handler.cr:51:27

 51 | last_modified = modification_time(file_path)
                      ^----------------
Error: undefined method 'modification_time' for Kemal::StaticFileHandler

Duplicate of #648 and #643

This is fixed on master, just not released yet.
@sdogruyol We need a release for compatibility with 1.6.0.