For some reason, No file named /cygdrive/c/Elixir/bin/mix got sent to bash as the command to run, usually this is by you typing it in or pasting it in. So my only advice is to use the correct command.
I can’t say for sure, so this is a guess and might be not what is really happening, but I will provide the steps necessary to check.
I think, that for some reason mix.bat is started instead of mix, it is able to start elixir in an environment that is not cygwin aware anymore, so elixir is not able to find /cygdrive/c/elixir/bin/mix, because it simply doesn’t exist in that context.
When one tries to start elixir with a file that does not exist a similar message appears, this is the main reason to think this:
$ elixir foo
No file named foo
To actually check if my theory is correct, you can do the following:
Personally I do not use cygwin as POSIX-wrapper anymore for about 2 years now, since there were problems everywhere. I had a much better success story after switching to MINGW64.
Well, MSYS2 has no elixir package, so you need to compile it by yourself. I’d only recommend this when you have a Unix/Linux background and you can install elixir and erlang by hand over there already or you will destroy your mingw env before it was even properly set up.
Before switching into just another unknown terrain, please check if that workaround with moving bat and ps1 away does work.
A native bash running under linux is the easiest, but you already mentioned the impossibility for you.
So I will give you some options, in no particular order
Install Ubuntu in a virtual machine. Might involve massive hard disk overhead and some time to set it up to your needs.
Install Vagrant and use it. For a phoenix project of mine I did once create a Vagrantfile which sets up an image which has all necessary stuff available on a CentOS 7 guest. I will try to extract necessary parts and post it somewhere when I am back home and my older son is in bed (about 6 hours from now)
A POSIX-Wrapper that actually works But unfortunately I do only know Cygwin which had many flaws back than and MSYS2/MingW64 which I’d only recommend to people familiar with linux‌.
An alias in ~/.bashrc, roughly like this: alias mix="/cygdrive/c/elixir/bin/elixir c:/elixir/bin/mix". After you changed your ~/.bashrc, you need to restart all open bash-sessions or re-source ~/.bashrc to make that change happen.
The last one might be the easiest, but before that try it out directly: /cygdrive/c/elixir/bin/elixir c:/elixir/bin/mix, if and only if this will get you the expected output of mix, you can insert that line from above in your RC-file and go for it.
In the command I gave you, there is no “/cygdrive/c/Elixir/bin/mix”, so the error message can’t be the same unless something is really borked!
Sorry if I sounded a bit harsh. But I really try to figure out where this message comes from and why. So the exact messages as they are printed to your console are crucial information.
Maybe we can even find a final solution here and on top of that report a bug upstream, fix included (or some warnings at least).
Uh, I may have missed the reason, but why use cygwin with elixir? I use just a windows bash install (mingw64 I think, and even then only because I am more comfortable with linux tools than Windows ones) and the stock command prompt and powershell without issue. Cygwin sets up a very…odd environment on Windows.
What happens if you do mix in a normal windows command prompt without the prior post listed renames?