将phoneix部署到heroku:Plug.Parsers.merge_params错误

时间:2016-12-11 10:58:34

标签: heroku elixir phoenix-framework

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

    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

尽我所能。如果是某种dep问题,请使用mix deps.get。

这一切都在我的本地机器上工作正常,而不是当我推送到heroku时。

1 个答案:

答案 0 :(得分:0)

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

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

相关问题