slouchpie
Using project's .iex.exs with gigalixir ps:remote_console
Gigalixir lets us start a remote shell, similar to iex --remsh. The command is:
gigalixir ps:remote_console -a my-app
Does anyone know if there is a way to make this shell use my project’s .iex.exs. I want this because my .iex.exs contains lots of nice aliases. I get very tired of typing alias MyApp.SomeContext.SomeModule.
Marked As Solved
jesse
Perhaps you can try adding the .iex.exs file as an overlay to get it included in the release. https://hexdocs.pm/mix/Mix.Tasks.Release.html#module-options
Also Liked
slouchpie
I’ve said it before and I’ll say it again. This forum is sooo good. The advice people give is such high-quality. It’s like living next to the Mage’s Guild.
slouchpie
LostKobrakai
You can do this:
wojtekmach
I noticed than when building the release locally and connecting to it, it works:
myapp$ cat .iex.exs
IO.puts "it works"
# terminal 1
myapp$ _build/dev/rel/myapp/bin/myapp start
# terminal 2
myapp$ _build/dev/rel/myapp/bin/myapp remote
it works
However, if I start the release from another directory, it doesn’t work:
# terminal 1
_build/dev/rel/myapp$ bin/myapp start
# terminal 2
myapp$ _build/dev/rel/myapp/bin/myapp remote
(no output)
It seems it’s a matter of where you start your release from and whether that
directory contains the .iex.exs file and so you could change your :releases
Mix configuration to copy the file into appropriate location.
I did notice one thing that while executing code or setting up aliases in the
.iex.exs file work, autocomplete of these aliases does not so it’s seems
it’s not fully supported.
LostKobrakai
Modifying this part in the created binary you call with bin/myapp remote, so it automatically loads the .iex.exs from wherever it is stored.







