Closed wulymammoth closed 7 years ago
Could it be that you are using the current release version from Hex while trying to follow the README on GitHub?
There have been some yet to be released changes to the startup process in https://github.com/elixytics/ua_inspector/commit/4a04e5e01d097336ee9579994e08db72afe3ae4a you are probably getting confused by.
Just adding the application to the Mixfile should be enough.
@mneudert I've removed the following from the list of children and it works and I'm able to access module functions and kick off the app or shell. I'm just unsure about how UAInspector will be supervised without it.
supervisor(UAInspector.Supervisor, [])
It is supervised via it's own application. Manually adding the supervisor is only useful if you do explicitly not want to start the application itself, perhaps because of some special startup code you want to run beforehand.
But to do that you would also need to move :ua_inspector
from :extra_applications
to :included_applications
as the first one automatically starts the application (and the supervision there) while the latter one only makes sure the code is available in an application release. (Only available on GitHub, not yet via Hex!)
If you are interested in how the supervision tree of your application looks like you can run :observer.start()
(erlang doc) from a connected iex
session (iex -S mix phx.server
should suffice). Whether that works depends on your environment but if it does it might help a lot :)
Having an issue just test-driving this lib in an a Phoenix app. Each time I try to start the Phoenix server or start an IEx shell, I receive the below error.
I'm not sure what I'm missing here. I've tried adding
:ua_inspector
to:extra_applications
in the Mixfile and I have added theUAInspector.Supervisor
spec to a the list of children in the Phoenix application which causes the below, because it doesn't seem to be able to find the module and/or function. I looked through the repo and I see that the module exists. I've been wracking my brain around this for about an hour and a half to no avail. Any help is greatly appreciated.Elixir 1.5.1 Phoenix 1.3.1