-3

I just want run IEx to require this package, I do not want create a mix project and into the deps.

For example, gem install bundle

How do I do this?

Anthony Dito
  • 3,610
  • 3
  • 29
  • 56
Yingce
  • 255
  • 2
  • 9
  • can you try "mix archive.install ". I dont exactly know how to use it nor do i say it is the solution. for help try "mix help archive.install" – coderVishal Oct 27 '15 at 02:59

1 Answers1

1

As I understood, mix archive.install is useful to install archives that will provide mix tasks. What you could do is to put all the .beam files in a repository that will be specified at iex/elixir startup (with the -pa $CUSTOMPATH option). This will load the .beam files during elixir startup.

For instance, in the elixir shell script, there is this line:

exec "$ERL_PATH" -pa "$SCRIPT_PATH"/../lib/*/ebin $ELIXIR_ERL_OPTIONS $ERL -extra "$@"

You can add an additional `-pa ~/.local/ebin" to load those .beam file

Hécate
  • 1,005
  • 9
  • 14
  • @Yingce I'm commenting this answer to link a blog post I recently wrote about that: https://blog.crypto-keupone.eu/an-iex-shell-with-preloaded-libraries.html – Hécate Dec 18 '15 at 21:51