Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
412 views
Welcome To Ask or Share your Answers For Others

1 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...