pprzetacznik / IElixir

Jupyter's kernel for Elixir programming language
Apache License 2.0
359 stars 42 forks source link

Support for windows #19

Open 30atm opened 8 years ago

30atm commented 8 years ago

Hi, I see you were referring to .sh files in the json settings file please could you advise if there is a separate config for windows

thank you

pprzetacznik commented 5 years ago

I recommend installing IElixir in WSL environment, eg. Ubuntu. I have not tested IElixir and Elixir/Erlang/OTP on Windows but if you manage to install, you can create kernel.json file in ./resources/ielixir with content given in install_script.sh file, ie.:

{
   "argv": ["'###PUT HERE PATH TO THE START_SCRIPT.SH FILE###'", "{connection_file}"],
   "display_name": "Elixir",
   "language": "Elixir"
}'

After that you should install your kernel in Jupyter with:

jupyter kernelspec install --user --replace --name=ielixir ./resources/ielixir

And run migration for IElixir:

ELIXIR_ERL_OPTIONS="-smp enable" mix ecto.migrate -r IElixir.Repo

start_script.sh is also very simple. It's run by Jupyter with the connection_file path, eg.:

./start_script.sh [connection_file]

so your cmd script should consume connection_file argument and run following file:

ELIXIR_ERL_OPTIONS="-smp enable" CONNECTION_FILE={###CONNECTION_FILE_ARG###} mix run --no-halt