0

分片安装顺利,但编译给出了这个错误。使用icr检查能够成功连接到本地 postgres 数据库。任何帮助是极大的赞赏!谢谢你。

      [aranin@acbc328b9a5b:kemal-react-pg-chat-master]$ crystal build src/app.cr --release
  Error in src/app.cr:44: instantiating 'Kemal:Module#run()'

  Kemal.run
        ^~~

  in lib/kemal/src/kemal.cr:11: instantiating 'run(Nil)'

    def self.run(port = nil)
    ^

  in lib/kemal/src/kemal.cr:41: instantiating 'HTTP::Server::Context#params()'

          image = env.params.url["image"]
                      ^~~~~~

  in lib/kemal/src/kemal/context.cr:11: instantiating 'route_lookup()'

        @request.url_params ||= route_lookup.params
                                ^~~~~~~~~~~~

  in lib/kemal/src/kemal/context.cr:21: instantiating 'HTTP::Request#override_method()'

        Kemal::RouteHandler::INSTANCE.lookup_route(@request.override_method.as(String), @request.path)
                                                            ^~~~~~~~~~~~~~~

  in lib/kemal/src/kemal/request.cr:7: instantiating 'check_for_method_override!()'

      @override_method ||= check_for_method_override!
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~

  in lib/kemal/src/kemal/request.cr:14: instantiating 'Kemal::ParamParser#body()'

        params = Kemal::ParamParser.new(self).body
                                              ^~~~

  in lib/kemal/src/kemal/param_parser.cr:24: expanding macro

      {% for method in %w(url query body json) %}
      ^

  in macro 'macro_4590134368' /Users/aranin/Documents/rub-me/crystalax/kemal-react-pg-chat-master/lib/kemal/src/kemal/param_parser.cr:24, line 26:
4

2 回答 2

3

这可能意味着针对 Crystal 0.20.0 的 kemal 版本尚未发布。您可以更改 shard.yml 文件以指向主分支:

dependencies:
  kemal:
    github: sdogruyol/kemal
    branch: master

这对我有用。

于 2016-11-23T12:30:33.183 回答
1

Kemal 0.17.0 发布,支持 Crystal 0.20.0。如果您不想跟踪大师,可以将其与

dependencies:
  kemal:
    github: sdogruyol/kemal
    version: 0.17.0
于 2016-11-24T06:58:33.970 回答