KronicDeth / intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Other
1.83k stars 153 forks source link

Can't add Chocolatey Elixir SDK #1159

Open luxx opened 6 years ago

luxx commented 6 years ago

I have elixir working fine on windows, however I cannot get the intellij-elixir plugin to work. When configuring the elixir SDK to use, I get this error:

The selected directory is not a valid home for Erlang SDK for Elixir SDK

intellij-elixier-cant-add

I am on windows 10, have installed elixir using chocolatey (following these steps: https://medium.com/@rpw952/elixir-development-on-windows-10-ff7ca03769d).

I have also reviewed #242, and reinstalled elixir, but there does not appear to be install corruption

PS C:\WINDOWS\system32> elixir -v
Erlang/OTP 21 [erts-10.0.1] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1]

Elixir 1.6.6 (compiled with OTP 19)
PS C:\WINDOWS\system32> get-command elixir

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Application     elixir.bat                                         0.0.0.0    C:\ProgramData\chocolatey\lib\Elixir/bin\elixir.bat

PS C:\WINDOWS\system32> ls  C:\ProgramData\chocolatey\lib\Elixir/bin

    Directory: C:\ProgramData\chocolatey\lib\Elixir\bin

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
------        6/19/2018  11:56 AM           3882 elixir
------        3/15/2018   2:57 AM           4747 elixir.bat
------        3/15/2018   2:57 AM           1239 elixirc
------        3/15/2018   2:57 AM           1325 elixirc.bat
------        3/15/2018   2:57 AM           2272 iex
------        3/15/2018   2:57 AM           2468 iex.bat
------       12/22/2017   2:58 AM             45 mix
------         2/6/2018   7:36 AM             95 mix.bat
------       12/22/2017   2:58 AM            576 mix.ps1

Any ideas?

abdul-playlogix commented 6 years ago

Experienced this too

KronicDeth commented 6 years ago

I've never added explicit support for Chocolatey on Window, only the Erlang Solutions installer, but the SDK Home directory is never the bin directory: it would likely be the C:\ProgramData\chocolatey\lib\Elixir as a Home Path needs the closest common ancestor of the bins and ebin directories.

nirleka commented 5 years ago

Here is my setup.

Using chocolatey installation procedures, I still got error when pointing the erlang home folder (not valid erlang directory). Checking the chocolatey install code, it only copying erlang binary file to chocolatey\bin and the erlang folder in chocolatey only consist of install - uninstall script and erlang logo. It makes the plugin detected it as wrong Erlang SDK folder.

So, i try install Erlang and Elixir SDK manually using installer from their site then pointing it in Intellij project SDK setting. Erlang detected successfully, but Elixir get error "Probably SDK Installed in C:\Program Files (x86)\Elixir is corrupt". The intellij is adding the Elixir successfully though (unknown elixir version).

elixir

unknown

So i guess, using Erlang & Elixir from chocolatey is not supported since it changed files in erlang SDK directory. But it works using manual installation albeit with unknown Elixir version on SDK label.

UkonnRa commented 4 years ago

+1 any advice?

leoneves commented 3 years ago

+1 chocolatey o/

psychedel commented 2 years ago

Just choose chocolatey folder as Erlang SDK path (as Erlang is in /bin there) And for Elixir SDK - /lib/Elixir

KronicDeth commented 2 years ago

Does anyone know of a Windows VM download with Chocolatey and the Erlang and Elixir octaves already installed? It takes awhile for me to setup Windows VM, so I rarely get around to testing Windows issues.

danvim commented 1 year ago

I see why this happened. You are supposed to first select the Erlang SDK path, then on the next prompt, select the Elixir SDK path. Chocolatey does not install Erlang SDK when installing Elixir it seems. I think the prompt text can be clearer to avoid this mistake.

FelixStumvoll commented 1 year ago

A workaround that worked for me was adding the Erlang SDK first through Project Structure >> Platform Settings >> SDKs and then add the Elixir SDK.

Then I can create a new project with the Elixir SDK

debojyoti452 commented 8 months ago

A workaround that worked for me was adding the Erlang SDK first through Project Structure >> Platform Settings >> SDKs and then add the Elixir SDK.

Then I can create a new project with the Elixir SDK

Worked for me. Thank you @FelixStumvoll