The Crystal Programming Language Forum

Updated Crystal to latest version. Getting Kemal error

Hello,

I upgraded Crystal from 0.30.1 to the latest version Crystal 0.35.1 (2020-06-19)

When I try to compile the code, I get the following error. Can someone please tell me how to fix this? I think I am using the latest versions of all the packages.

Warning: Zlib is deprecated, use Compress::Zlib
Showing last frame. Use --error-trace for full trace.

In lib/kemal/src/kemal/helpers/helpers.cr:143:7

 143 | Gzip::Writer.open(env.response) do |deflate|

This is the full error-trace

    Warning: Zlib is deprecated, use Compress::Zlib
In src/crystalcal.cr:14:1

 14 | require "./importantroutes.cr"
      ^
Error: while requiring "./importantroutes.cr"


In src/importantroutes.cr:1732:17

 1732 | send_file(env, "#{CalToPdf::DEST_DIR}/#{calid}.zip",
        ^--------
Error: instantiating 'send_file(HTTP::Server::Context, String)'


In lib/kemal/src/kemal/helpers/helpers.cr:135:8

 135 | File.open(file_path) do |file|
            ^---
Error: instantiating 'File.class#open(String)'


In lib/kemal/src/kemal/helpers/helpers.cr:135:8

 135 | File.open(file_path) do |file|
            ^---
Error: instantiating 'File.class#open(String)'


In lib/kemal/src/kemal/helpers/helpers.cr:143:7

 143 | Gzip::Writer.open(env.response) do |deflate|
       ^
Error: undefined constant Gzip::Writer

See https://github.com/kemalcr/kemal/issues/583#issuecomment-658737340.

@Blacksmoke16 thank you so much. That worked great.