how can i using mix(Elixir) install package install to system?

会有一股神秘感。 提交于 2019-12-13 09:42:35

问题


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?


回答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



来源:https://stackoverflow.com/questions/33358776/how-can-i-using-mixelixir-install-package-install-to-system

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!