7stud

7stud

Where does mix look for rebar?

Here’s my rebar info:

/elixir_programs/friends$ which rebar
/usr/local/bin/rebar

~/elixir_programs/friends$ rebar --version
rebar 2.6.4 19 20170625_072305 git 2.6.4-6-g2a52f60

~/elixir_programs/friends$ which rebar3
/usr/local/bin/rebar3

~/elixir_programs/friends$ rebar3 --version
rebar 3.0.0-beta.4+build.3189.ref21ae314 on Erlang/OTP 20 Erts 9.3

And here’s what my PATH looks like:

$ ruby -e "puts ENV['PATH'].split ':'"
/Users/7stud/.asdf/shims
/Users/7stud/.asdf/bin
/Users/7stud/.rvm/gems/ruby-2.4.0/bin
/Users/7stud/.rvm/gems/ruby-2.4.0@global/bin
/Users/7stud/.rvm/rubies/ruby-2.4.0/bin
/opt/local/bin
/opt/local/sbin
/Library/Frameworks/Python.framework/Versions/3.6/bin
/Users/7stud/.evm/erlang_versions/otp_src_20.2/bin
/usr/local/mysql/bin
/usr/local/bin/mongodb-osx-x86_64-3.0.7/bin
/Users/7stud/.local/bin
/Users/7stud/perl5/perlbrew/bin
/Users/7stud/perl5/perlbrew/perls/perl-5.20.2/bin
/Users/7stud/.nvm/versions/node/v9.4.0/bin
/usr/local/bin
/Library/Frameworks/Python.framework/Versions/2.7/bin
/Library/Frameworks/Python.framework/Versions/3.4/bin
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/go/bin
/usr/local/MacGPG2/bin
/Applications/Wireshark.app/Contents/MacOS
/usr/local/git/bin
/usr/local/go/bin
//Users/7stud/go_programs/bin
/Applications/Rakudo/bin
/Applications/Rakudo/share/perl6/site/bin
/Users/7stud/.rvm/bin

I’m following the “Getting Started” tutorial for Ecto, and it says to issue this command:

 $ mix ecto.gen.repo -r Friends.Repo

Here’s what I get:

~/elixir_programs/friends$ mix ecto.gen.repo -r Friends.Repo
Could not find "rebar", which is needed to build dependency :poolboy
I can install a local copy which is just used by Mix
Shall I install rebar? (if running non-interactively, use "mix local.rebar --force") [Yn]

Why can’t mix find my rebar? Is it better practice to let mix install its own version of rebar?

Most Liked

michalmuskala

michalmuskala

Mix uses its own copy of rebar placed in $MIX_HOME/rebar and $MIX_HOME/rebar3, by default $MIX_HOME is ~/.mix. This is done, so that we can verify a concrete version of rebar works fine with mix and does not have any bugs - in case such bugs are discovered, it’s also easier to update. It removes one variable (version of rebar) when debugging issues with mix.

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
New
dokuzbir
Hello, I am trying to convert my lists to string without losing brackets.For start i have 3 map. They look like these buyer = %{ id: ...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
Phillipp
Hey, I have a NanoPi-M3 and try to install Elixir on their Ubuntu image. I followed the Raspberry Pi installation instructions from the ...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
977 41022 311
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
William
I would like to know that is there any online source for learning Phoenix Framework for building E-Commerce Store? Any advantage on build...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement