Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 30 2019 08:08
    hoang17 starred kemalcr/kemal
  • Jan 30 2019 06:38
    cayter starred kemalcr/kemal
  • Jan 27 2019 18:40
  • Jan 27 2019 15:56
    sdogruyol closed #498
  • Jan 27 2019 15:56
    sdogruyol commented #498
  • Jan 27 2019 15:53
    sdogruyol closed #509
  • Jan 27 2019 15:53
    sdogruyol commented #509
  • Jan 27 2019 05:14
    mjb2kmn starred kemalcr/kemal
  • Jan 25 2019 01:42
    unixc3t starred kemalcr/kemal
  • Jan 24 2019 22:41
    talentlessguy starred kemalcr/kemal
  • Jan 24 2019 04:00
    ntilotta starred kemalcr/kemal
  • Jan 23 2019 10:12
    iwaruby starred kemalcr/kemal
  • Jan 23 2019 02:35
    isaced starred kemalcr/kemal
  • Jan 21 2019 18:33
    f9n starred kemalcr/kemal
  • Jan 19 2019 12:53
    SeedyROM starred kemalcr/kemal
  • Jan 17 2019 19:06

    sdogruyol on master

    Do not try to call ExceptionHan… Merge pull request #515 from ke… (compare)

  • Jan 17 2019 19:06
    sdogruyol closed #515
  • Jan 17 2019 19:06
    sdogruyol closed #514
  • Jan 17 2019 19:06
    sdogruyol edited #515
  • Jan 17 2019 15:09
    galfarragem starred kemalcr/kemal
roduquen
@roduquen
Hey there

I have the same error :

- `crystal (>= 0.36.0)` required by `kemal 1.0.0`

but I am using crystal 1.0.0, why it's still writing this error ?

erdnaxeli
@erdnaxeli:cervoi.se
[m]
there are other lines, especially "- crystal (< 1.0.0) required by radix 0.4.0" and "- crystal (< 1.0.0) required by kilt 0.4.0"
roduquen
@roduquen
You mean that it s just written because of other lib ?
erdnaxeli
@erdnaxeli:cervoi.se
[m]
those libs do not work with crystal 1.0 yet
roduquen
@roduquen
radix is on 1.0.0
erdnaxeli
@erdnaxeli:cervoi.se
[m]
what is your full error message?
roduquen
@roduquen
- `crystal (>= 0.36.0)` required by `kemal 1.0.0`
- `crystal (~> 0.35, >= 0.35.0)` required by `cryomongo 0.3.3+git.commit.d2e1f31fdf879c26aaf961eda2cb55dfa3f69f0a`
- `crystal (>= 0.35.0)` required by `radix 0.4.1`
- `crystal (< 2.0.0)` required by `kilt 0.4.1`
- `crystal (~> 0.33, >= 0.33.0)` required by `exception_page 0.1.4`
- `crystal (~> 0.35, >= 0.35.0)` required by `bson 0.3.0`
this one
ddd
@Dan-Do
I don't have this issue. I don't use shard install, just download the shard manually on github, extract the files then compile
roduquen
@roduquen
kilt and radix are updated
Yep it s shards that is responsible of the error
erdnaxeli
@erdnaxeli:cervoi.se
[m]
that's not the full message
roduquen
@roduquen
oh sorry
Unable to satisfy the following requirements:

- `crystal (>= 0.36.0)` required by `kemal 1.0.0`
- `crystal (~> 0.35, >= 0.35.0)` required by `cryomongo 0.3.3+git.commit.d2e1f31fdf879c26aaf961eda2cb55dfa3f69f0a`
- `crystal (>= 0.35.0)` required by `radix 0.4.1`
- `crystal (< 2.0.0)` required by `kilt 0.4.1`
- `crystal (~> 0.33, >= 0.33.0)` required by `exception_page 0.1.4`
- `crystal (~> 0.35, >= 0.35.0)` required by `bson 0.3.0`
Failed to resolve dependencies, try updating incompatible shards or use --ignore-crystal-version as a workaround if no update is available.
erdnaxeli
@erdnaxeli:cervoi.se
[m]
ok it does not say much more :p
did you try updating?
roduquen
@roduquen
I don't really get what is updating with shards ^^'
shards update run the same error
erdnaxeli
@erdnaxeli:cervoi.se
[m]
ok
roduquen
@roduquen
In reality it works locally with --ignore-crystal-version but it's a problem for travis build, and I guess that's normal that they didn't allow this on their build
erdnaxeli
@erdnaxeli:cervoi.se
[m]
I have a similar error as you
roduquen
@roduquen
Yep I just saw on kilt repo that they are on 0.6.1
erdnaxeli
@erdnaxeli:cervoi.se
[m]
yeah but kilt 0.4.1 should have fixed it…
the previous error that CaDs (Carlos Donderis) had was about radix ard kilt 0.4.0, but the versions 0.4.1 should be ok now :/
roduquen
@roduquen
^^ it looks that nop, I hope update kilt to 0.6.1 in kemal requirements will solve this
erdnaxeli
@erdnaxeli:cervoi.se
[m]
I don't see how, the "crystal" field in shards.yaml is the same
roduquen
@roduquen
I am checking kilt commits, I don't find the commit to 0.4.1, just see from 0.4.0 to 0.6.0 on master, and then from 0.6.0 added crystal < 2.0.0, then bump to 0.6.1
erdnaxeli
@erdnaxeli:cervoi.se
[m]
the commit is here: jeromegn/kilt@772ad9e
roduquen
@roduquen
Humm, while checking at commit tree from master it s not here anymore
the one that follow the previous : jeromegn/kilt@d177f02 is this one : jeromegn/kilt@bfd630f
erdnaxeli
@erdnaxeli:cervoi.se
[m]
yes, the commit I linked is not on master
roduquen
@roduquen
oh yep I see this branch
Coding Concepts
@codingconcepts

Hi all, I know that Kemal handlers are resolved to the top-level, so placing them in classes with instance variable access is not possible, e.g:

class HelloHandler
  def initialize(msg : String)
    @msg = msg
  end

  get "/" do |env|
    @msg
  end
end

I've also looked at Kemal.config.handlers but the call method only seems to work as a passthrough for middleware chaining. Does Kemal have much in the way of modular support?

Cheers!

erdnaxeli
@erdnaxeli:cervoi.se
[m]
What I does it
module SomethingApi
  def self.setup(service)
    get "/" do |env|
      service.do_something
      "something"
    end
  end
end
not sure if it helps ^^
Coding Concepts
@codingconcepts
Ah, thank you, @erdnaxeli! I’ll give this a go when I’m back at my laptop 🙂
Coding Concepts
@codingconcepts
It works beautifully! Thanks again, @erdnaxeli 🙏
erdnaxeli
@erdnaxeli:cervoi.se
[m]
You're welcome :)
:point_up: Edit: What I does is
module SomethingApi
  def self.setup(service)
    get "/" do |env|
      service.do_something
      "something"
    end
  end
end
Coding Concepts
@codingconcepts
Hi @erdnaxeli, sorry, do you have an example of this being setup for a spec? I’m calling my module to configure the routes but Kemal’s enumerable of handlers remains empty when my spec gets called 🤷‍♂️
erdnaxeli
@erdnaxeli:cervoi.se
[m]
no sorry. I didn't try to test directly the kemal handler yet.
Coding Concepts
@codingconcepts
No worries at all! If i manage, I’ll share back 🙂
Coding Concepts
@codingconcepts

Hey @erdnaxeli, solved for when you get round to testing your handlers :)

Spec.before_each do
  config = Kemal.config
  config.env = "test"
  config.setup
end

Spec.after_each do
  Kemal.config.clear
end

...in addition to calling SomethingApi.setup

erdnaxeli
@erdnaxeli:cervoi.se
[m]
Nice!
Alex Kampa
@alex-kampa
Hello everyone! Does anyhow here know how to run Kemal in silent mode ie without "Kemal doesn't know this way." screens and without any message when there is an execution error?
ddd
@Dan-Do
just overwrite the method error_400 and error_500?
Johannes Müller
@straight-shoota
the error page with stack trace etc. should only be shown in development mode
For adjusting the normal error page, see https://kemalcr.com/guide/#custom-errors
Alex Kampa
@alex-kampa
thanks @Dan-Do and @straight-shoota