【问题标题】:Deploy phoneix to heroku: Plug.Parsers.merge_params Error将phoenix部署到heroku:Plug.Parsers.merge params Error
【发布时间】:2016-12-12 18:18:25
【问题描述】:

尝试在 Heroku 上部署我的 phoenix 应用程序但收到此错误:

    2016-12-11T10:47:08.910163+00:00 app[web.1]: Request: GET /
    2016-12-11T10:47:08.910164+00:00 app[web.1]: ** (exit) an exception was raised:
    2016-12-11T10:47:08.910165+00:00 app[web.1]:     ** (FunctionClauseError) no function clause matching in Plug.Parsers.merge_params/2
    2016-12-11T10:47:08.910170+00:00 app[web.1]:         (plug) lib/plug/parsers.ex:233: Plug.Parsers.merge_params(%{__struct__: Plug.Conn, adapter: {Plug.Adapters.Cowboy.Conn, :...}, assigns: %{}, before_send: [#Function<1.128912898/1 in Plug.Logger.call/2>], body_params: %Plug.Conn.Unfetched{aspect: :body_params}, cookies: %Plug.Conn.Unfetched{aspect: :cookies}, halted: false, host: "enigmatic-ocean-000.herokuapp.com", method: "GET", owner: #PID<0.392.0>, params: %Plug.Conn.Unfetched{aspect: :params}, path_info: [], peer: {{10, 179, 164, 130}, 18439}, port: 80, private: %{phoenix_endpoint: Scorecard.Endpoint}, query_params: %Plug.Conn.Unfetched{aspect: :query_params}, query_string: "", remote_ip: {10, 179, 164, 130}, req_cookies: %Plug.Conn.Unfetched{aspect: :cookies}, req_headers: [{"host", "enigmatic-ocean-000.herokuapp.com"}, {"connection", "close"}, {"cache-control", "max-age=0"}, {"upgrade-insecure-requests", "1"}, {"user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36"}, {"accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"}, {"accept-encoding", "gzip, deflate, sdch, br"}, {"accept-language", "en-US,en;q=0.8"}, {"x-request-id", "426e40c0-eebe-4182-b7f9-5cbd13b992ac"}, {"x-forwarded-for", "203.29.154.246"}, {"x-forwarded-proto", "https"}, {"x-forwarded-port", "443"}, {"via", "1.1 vegur"}, {"connect-time", "0"}, {"x-request-start", "1481453228780"}, {"total-route-time", "0"}], request_path: "/", resp_body: nil, resp_cookies: %{}, resp_headers: [{"cache-control", "max-age=0, private, must-revalidate"}, {"strict-transport-security", "max-age=31536000"}, {"x-request-id", "426e40c0-eebe-4182-b7f9-5cbd13b992ac"}], scheme: :https, script_name: [], secret_key_base: "My/O+hi0NqlWI6JpE4mdSelDljeqMLJJ88YuZqbKjtdkLtQFyexQLjccDqUORbiY", state: :unset, status: nil}, %{})
    2016-12-11T10:47:08.910170+00:00 app[web.1]:         (scorecard) lib/scorecard/endpoint.ex:1: Scorecard.Endpoint.phoenix_pipeline/1
    2016-12-11T10:47:08.910171+00:00 app[web.1]:         (scorecard) lib/scorecard/endpoint.ex:1: Scorecard.Endpoint.call/2
    2016-12-11T10:47:08.910172+00:00 app[web.1]:         (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
    2016-12-11T10:47:08.910172+00:00 app[web.1]:         (cowboy) src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
    2016-12-11T10:47:09.610445+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=enigmatic-ocean-000.herokuapp.com request_id=ad0045f8-31b5-4305-abd4-3325cbdc23cc fwd="203.29.154.246" dyno=web.1 connect=0ms service=4ms status=200 bytes=1494

尽我所能。混合 deps.get 以防它是某种 dep 问题。

在我的本地机器上一切正常,只是当我推送到 heroku 时就不行了。

【问题讨论】:

    标签: heroku elixir phoenix-framework


    【解决方案1】:

    我最终更改了 elixir_buildpack.config 以将 elixir 版本升级到 1.3.0。

    也许这是解决问题的原因,或者是因为重新编译了 heorku 文件并且问题自动神奇地解决了。

    【讨论】:

      猜你喜欢
      • 2018-04-30
      • 2023-03-10
      • 2017-05-22
      • 2023-03-29
      • 2021-04-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多