-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while deploying to Heroku #74
Comments
Can you try to add confex as a depend and use |
With Confex I get a similar error to when I was using 2017-08-19T16:45:45.234872+00:00 heroku[web.1]: State changed from crashed to starting
2017-08-19T16:45:48.760783+00:00 heroku[web.1]: Starting process with command `mix run --no-halt`
2017-08-19T16:45:53.362469+00:00 app[web.1]: {"Kernel pid terminated",application_controller,"{application_start_failure,maru,{{undef,[{'Elixir.Confex',process_env,[[{http,[{port,{system,<<\"PORT\">>}}]}]],[]},{'Elixir.Maru.Supervisor','-maru_servers/0-fun-0-',1,[{file,\"lib/maru/supervisor.ex\"},{line,55}]},{'Elixir.Enum','-map/2-lists^map/1-0-',2,[{file,\"lib/enum.ex\"},{line,1255}]},{'Elixir.Maru.Supervisor',init,1,[{file,\"lib/maru/supervisor.ex\"},{line,15}]},{supervisor,init,1,[{file,\"supervisor.erl\"},{line,294}]},{gen_server,init_it,2,[{file,\"gen_server.erl\"},{line,365}]},{gen_server,init_it,6,[{file,\"gen_server.erl\"},{line,333}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,247}]}]},{'Elixir.Maru',start,[normal,[]]}}}"}
2017-08-19T16:45:53.362667+00:00 app[web.1]: Kernel pid terminated (application_controller) ({application_start_failure,maru,{{undef,[{'Elixir.Confex',process_env,[[{http,[{port,{system,<<"PORT">>}}]}]],[]},{'Elixir.Maru.Supervisor','-maru_serve When I try to execute locally, I get this message: Generated jesse_api app
=INFO REPORT==== 19-Aug-2017::14:44:38 ===
application: logger
exited: stopped
type: temporary
** (Mix) Could not start application maru: Maru.start(:normal, []) returned an error: an exception was raised:
** (UndefinedFunctionError) function Confex.process_env/1 is undefined or private
(confex) Confex.process_env([http: [port: {:system, "PORT"}]])
(maru) lib/maru/supervisor.ex:55: anonymous fn/1 in Maru.Supervisor.maru_servers/0
(elixir) lib/enum.ex:1255: Enum."-map/2-lists^map/1-0-"/2
(maru) lib/maru/supervisor.ex:15: Maru.Supervisor.init/1
(stdlib) supervisor.erl:294: :supervisor.init/1
(stdlib) gen_server.erl:365: :gen_server.init_it/2
(stdlib) gen_server.erl:333: :gen_server.init_it/6
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3 Here is my defmodule JesseAPI.Mixfile do
use Mix.Project
def project do
[
app: :jesse_api,
version: "0.1.0",
elixir: "~> 1.5",
start_permanent: Mix.env == :prod,
deps: deps()
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
{:maru, "~> 0.12"},
{:confex, "~> 3.2.3"}
]
end
end |
I just checked, the confex API changed. |
fixed and released v0.12.3, Thank you! |
Will it possible in the future to not have to include |
@jalcine Thank you for the suggestion |
Oh okay! I'm a bit new to this scene - do you have an example of how this
would work? This would be helpful in the README about setting up an
application.
…On Thursday, September 7, 2017 7:13:47 PM PDT Xiangrong Hao wrote:
@jalcine
For now, all maru services started by `Application.start(:maru)`, it's bad.
I'll make something like `Maru.child_spec(module, options)` to make it a
supervisor child and developers can put it in any supervisor tree they want
🙂 and then, the `options` can be totally custom and confex is nolonger a
dependency.
Thank you for the suggestion
|
we don't have this for now 😞 |
Hey, it seems the problem still exists, right? |
Oh, this feature is already released with 0.13.2, follow such steps to start maru in your own supervisor tree:
I'm not sure whether it's clear enough, feel free to let me know if you get other issues. |
I looked for an hour on how to solve this issue until I found this. However, the code seems to be not quite right, hence here's what I went with: def init(_type, opts) do
Confex.Resolver.resolve(opts)
end Maybe this should be documented somewhere? |
@mrusme sorry for that, will do 🙈 |
I have an issue to deploy a simple application to Heroku. Heroku always responds with the following error:
Here is my
config.exs
(using{:system, "PORT"}
was causing other issues):And here is my
elixir_buildpack.config
:Does anyone have any clue of what may be going on?
The text was updated successfully, but these errors were encountered: