Fast, Effect, Simple Web Framework for Crystal. Help Kemal development https://www.patreon.com/sdogruyol
sdogruyol on master
Do not try to call ExceptionHan… Merge pull request #515 from ke… (compare)
I'm giving a try to the 1.0 versions of both Crystal and Kemal but I'm running into a trouble when installing the shards
shards.yml looks like
crystal: 1.0.0
dependencies:
kemal:
github: kemalcr/kemal
version: 1.0.0
and I have crystal 1.0.0 installed
crystal -v
Crystal 1.0.0 (2021-03-22)
yet, when I run shards install I get this error message
Unable to satisfy the following requirements:
- `crystal (>= 0.36.0)` required by `kemal 1.0.0`
- `crystal (< 1.0.0)` required by `radix 0.4.0`
- `crystal (< 1.0.0)` required by `kilt 0.4.0`
- `crystal (~> 0.33, >= 0.33.0)` required by `exception_page 0.1.4`
Failed to resolve dependencies, try updating incompatible shards or use --ignore-crystal-version as a workaround if no update is available.
am I doing something wrong?
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 ?
crystal (< 1.0.0)
required by radix 0.4.0
" and "- crystal (< 1.0.0)
required by kilt 0.4.0
"
- `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
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.
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!
module SomethingApi
def self.setup(service)
get "/" do |env|
service.do_something
"something"
end
end
end
module SomethingApi
def self.setup(service)
get "/" do |env|
service.do_something
"something"
end
end
end