version-fox / vfox-elixir

Elixir vfox plugin. Use the vfox to manage multiple Elixir versions in Linux/Darwin MacOS/Windows. all platform~
Apache License 2.0
8 stars 1 forks source link

Elixir build failing when used as devcontainer feature #3

Closed ccavolt closed 5 months ago

ccavolt commented 5 months ago

Hi, I'm building devcontainer features for vfox, vfox-erlang, and vfox-elixir. I'm pretty sure I have the first two figured out but I'm stuck on vfox-elixir. When I try to run a build I get the following error:

image

I normally like trying to figure out things myself but I'm not sure what to do here. The error messages are vague and I'm not well versed in Lua or makefiles. If you can provide any help, I'd greatly appreciate it! If there's any additional information that would help, just let me know.

yeshan333 commented 5 months ago

Hi, I'm building devcontainer features for vfox, vfox-erlang, and vfox-elixir. I'm pretty sure I have the first two figured out but I'm stuck on vfox-elixir. When I try to run a build I get the following error:

image

I normally like trying to figure out things myself but I'm not sure what to do here. The error messages are vague and I'm not well versed in Lua or makefiles. If you can provide any help, I'd greatly appreciate it! If there's any additional information that would help, just let me know.

It seem that the erlang compiler (aka erlc) not found in $PATH. If you use vfox-erlang to install Erlang/OTP, you must use the vfox use erlang@xxxx before you install Elixir. image

Hear are the example installation flow https://github.com/version-fox/vfox-elixir/blob/5e6fcc5989fc55348cca45fae1bf3bae18201b72/.github/workflows/e2e_test.yaml#L54:

image

# like this
vfox use erlang@xxx
vfox install elixir@xxx

@ccavolt

ccavolt commented 5 months ago

@yeshan333 Thanks for the quick response! In my script, I had included the vfox use command. What ended up being the problem was the "vfox activate bash" command, being in .bashrc, doesn't activate in scripts, so I had to trigger it manually after installing Erlang, and then again after installing Elixir in order to get the PATH to update. I see now that your example installation flow is also calling vfox activate bash after installing each language.

Thanks for pointing me in the right direction and for writing this plugin!