Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GZip and Flate Need Required. #583

Closed
usern3 opened this issue Jul 15, 2020 · 18 comments
Closed

GZip and Flate Need Required. #583

usern3 opened this issue Jul 15, 2020 · 18 comments
Labels

Comments

@usern3
Copy link

usern3 commented Jul 15, 2020

Description

Kemal doesn't run "out of the box". Some extra requires are necessary that should be included when you require Kemal. Seems this line isn't working?

{% if compare_versions(Crystal::VERSION, "0.35.0-0") >= 0 %}
  require "compress/deflate"
  require "compress/gzip"
{% end %}

Steps to Reproduce

  1. Install kemal shard
  2. Run

Expected behavior: To work out of the box.

Actual behavior: Need to require Flate and GZip.

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

 143 | Gzip::Writer.open(env.response) do |deflate|
       ^
Error: undefined constant Gzip::Writer
In lib/kemal/src/kemal/helpers/helpers.cr:148:7

 148 | Flate::Writer.open(env.response) do |deflate|
       ^
Error: undefined constant Flate::Writer

Versions

Crystal: 0.35.1
Kemal: 0.26.1
OS: Pop_OS 20.04 (Ubuntu 20.04)

@mamantoha
Copy link
Contributor

mamantoha commented Jul 15, 2020

Hi, @nolyoi use Kemal from the master branch.

Add this to your application's shard.yml:

dependencies:
  kemal:
    github: kemalcr/kemal
    branch: master

@usern3
Copy link
Author

usern3 commented Jul 15, 2020

Hi, @nolyoi use Kemal from the master branch.

Add this to your application's shard.yml:

dependencies:
  kemal:
    github: kemalcr/kemal
    branch: master

Still not showing up in the helpers file with branch: master added. Just deleted kemal, reinstalled with branch: master and same issue.

@Blacksmoke16
Copy link
Contributor

Blacksmoke16 commented Jul 15, 2020

Duplicate of:

Fixed by #570, just waiting on a new release. Can use branch, or commit options as mentioned in #572.

If you have shard.lock be sure to run shards update and not shards install.

@Xosmond
Copy link

Xosmond commented Sep 13, 2020

@Blacksmoke16 Its September, why didn't you release this?

@Blacksmoke16
Copy link
Contributor

Blacksmoke16 commented Sep 13, 2020

@Xosmond Well for one this isn't my project and I don't have permission to do so. I think you meant to ask @sdogruyol.

@kingsleyh
Copy link

@sdogruyol will you be releasing this soon?

@vinyll
Copy link

vinyll commented Oct 7, 2020

This pretty much breaks the basic quick tutorial.
That's refraining newcomers, that would be great to be considered 🙏

@vinyll
Copy link

vinyll commented Oct 7, 2020

As mentioned in previous comments the following combination did the job for me too:

dependencies:
  kemal:
    github: kemalcr/kemal
    branch: master

Then reinstall with

shards update

@kingsleyh
Copy link

Maybe @sdogruyol is taking a break

@ricardobeat
Copy link

ricardobeat commented Oct 9, 2020

@sdogruyol @bcardiff @mamantoha I'd be happy to help get this out if you don't have the time.

@ricardobeat
Copy link

In the meantime, use this to also avoid an issue with websockets (#577):

dependencies:
  kemal:
    github: kemalcr/kemal
    commit: dfe7dca

@mamantoha
Copy link
Contributor

@ricardobeat It's already fixed in master branch. You can update your project's shard.yml

dependencies:
  kemal:
    github: kemalcr/kemal
    branch: master

and run

shards update.

That's it.

@sdogruyol should make a new release with the latest changes.

@otherguy
Copy link

otherguy commented Nov 6, 2020

I noticed that this issue is open since July, and now it's November. I also noticed it's already fixed and it seems all it needs is a release!

A new release with the latest changes would be greatly appreciated!

@ricardobeat
Copy link

@bcardiff @sdogruyol is something going on, anything we can do to help? There have been no updates to the project since August.

@bcardiff
Copy link
Contributor

I'm not the maintainer of the repo, nor have access to the organization. @sdogruyol is the one who can do releases.

@matteofuzz
Copy link

In my company we're evaluating more use of Crystal and Kemal, but this issue is concerning, is the project maintained? What's in the future?

@sdogruyol
Copy link
Member

It's been a while, I'll maintain and triage the issues. Also adding more people as maintainers.

@sdogruyol sdogruyol added the bug label Nov 27, 2020
@sdogruyol
Copy link
Member

Closing as the original issue is already resolved 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests