Comments (3)
Thanks. Pls send a PR if you have time.
from rebar_mix.
I had the same issue
Here in rebar_mix/src/rebar_mix_utils.erl, in the function get_lib_dir
(line 42-53) we have the following case expression
case rebar_utils:sh("elixir -e \"IO.puts :code.lib_dir(:elixir)\"", [return_on_error]) of
{ok, ElixirLibs_} ->
filename:join(re:replace(ElixirLibs_, "\\s+", "", [global,{return,list}]), "../");
_ ->
erlang:error(missing_elixir)
end;
The insteresting part is re:replace(ElixirLibs_, "\\s+", "", [global,{return,list}])
It basically takes the path to Elixir and removes all whitespaces from it. And so if our path happens to start with, for instance, C:\Program Files (default when installing Elixir on windows), it becomes C:\ProgramFiles, resulting in an error.
I spent quite some time trying to figure out what the problem was, so I thought it is worth mentioning it
I'm not sure if it is a bug. I assume there is a valid reason why we would remove whitespaces from the path, and so I don't know if we should do something about it or keep it as is. I do think that it should be mentioned in the README, though. (e.g. in the requiremets section, we might include something like "Make sure that the path to your Elixir installation contains no significant whitespaces". I beleive, that could save a lot of debagging time for the future users).
from rebar_mix.
No there's no good reason to remove whitespace from a path, it just makes it wrong. The proper fix is to escape and/or quote the path adequately.
from rebar_mix.
Related Issues (18)
- "rebar3 shell" fails with an error
- ... has invalid version ~> Version_1 or ~> Version_2 HOT 11
- Missing hook find_elixir_libs HOT 5
- Could not compile phoenix based application HOT 3
- rebar3 compile crash as init is expecting {error, string()} HOT 3
- Dependency in _checkouts directory does not work HOT 2
- Handling optional dependencies
- Plugin doesn't work with upcoming Elixir v1.10 HOT 2
- compile fails with {:error, :no_beam_info} with elixir 1.10 HOT 13
- not downloading deps dependencies HOT 4
- No valid version ([]) of .app file found HOT 8
- Can we remove features that rebar3 and hex_core already cover? HOT 2
- consolidate_protocols seems to be gone from 0.5 HOT 20
- Why is `deps.get` called? HOT 1
- rebar_mix_hex needed?
- [bug] rebar_mix can not load eex, iex ...
- Won't work with ` rebar3_path_deps` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rebar_mix.