Skip to content

Commit 0c2b763

Browse files
authored
Add hint to needed dependencies for observer (#12861)
1 parent 52158d7 commit 0c2b763

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

lib/elixir/pages/mix-and-otp/dynamic-supervisor.md

+16-3
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,25 @@ Since we have relied only on a non-shared partition of the bucket supervisor so
161161
Now that we have defined our supervision tree, it is a great opportunity to introduce the Observer tool that ships with Erlang. Start your application with `iex -S mix` and key this in:
162162

163163
```elixir
164-
iex> :observer.start
164+
iex> :observer.start()
165165
```
166166

167-
A GUI should pop up containing all sorts of information about our system, from general statistics to load charts as well as a list of all running processes and applications.
167+
> #### Missing dependencies {: .warning}
168+
>
169+
> When running `iex` inside a project with `iex -S mix`, `observer` won't be available as a dependency. To do so, you will need to call the following functions before:
170+
>
171+
> ```elixir
172+
> iex> Mix.ensure_application!(:wx)
173+
> iex> Mix.ensure_application!(:runtime_tools)
174+
> iex> Mix.ensure_application!(:observer)
175+
> iex> :observer.start()
176+
> ```
177+
>
178+
> If any of the calls above fail, here is what may have happened: some package managers default to installing a minimized Erlang without WX bindings for GUI support. In some package managers, you may be able to replace the headless Erlang with a more complete package (look for packages named `erlang` vs `erlang-nox` on Debian/Ubuntu/Arch). In others managers, you may need to install a separate `erlang-wx` (or similarly named) package.
179+
>
180+
> There are conversations to improve this experience in future releases.
168181
169-
> Note: If `observer` does not start, here is what may have happened: some package managers default to installing a minimized Erlang without WX bindings for GUI support. In some package managers, you may be able to replace the headless Erlang with a more complete package (look for packages named `erlang` vs `erlang-nox` on Debian/Ubuntu/Arch). In others managers, you may need to install a separate `erlang-wx` (or similarly named) package. Alternatively, you can skip this section and continue the guide.
182+
A GUI should pop up containing all sorts of information about our system, from general statistics to load charts as well as a list of all running processes and applications.
170183
171184
In the Applications tab, you will see all applications currently running in your system alongside their supervision tree. You can select the `kv` application to explore it further:
172185

0 commit comments

Comments
 (0)