Emily

Emily

I installed Elixir using asdf. elixir -v shows the install was successful. Yet I’m getting “mix: command not found” errors.

~./bashrc path is referenced:

. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"

/etc/profile.d/elixir.sh is referenced:

export PATH=$PATH:/usr/local/lib/elixir/1.13.2-otp-24/bin

Erlang install is: erlang 24.2.1
Elixir install is: elixir 1.13.2-otp-24

I believe they are compatible.

I must be missing a path reference somewhere?
What am I doing wrong?

Showing Posts 1 to 10

massimo

massimo

two things you can try

asdf reshim

and

export PATH=~/.asdf/shims:$PATH

Emily

Emily OP

That’s not working.
If install outside of asdf using command:
sudo apt-get install elixir
The mix command then works.
Problem is I need to install a specific version.
Is there a way to do that without using asdf?

cloudytoday

cloudytoday

Is mix binary present in $HOME/.asdf/shims/mix? Did you do asdf global elixir (version)?

Stratus3D

Stratus3D

Asdf Core Team

asdf maintainer here. There couple that could be causing this. If what @massimo said did not work, I’d suggest re-reading the asdf getting started guide (Getting Started | asdf) and make sure you follow the instructions for your operating system and interactive shell.

If you do all that and it still doesn’t work, it means there something else interfering with asdf in your shell. I’ve found the following commands to be helpful when debugging versions installed with asdf:

type -a mix
type -a elixir

Both of these commands should print out a one or more paths to mix and elixir executables on your machine. If things are working properly you should see the asdf shim paths listed first ($HOME/.asdf/shims/mix and $HOME/.asdf/shims/elixir).

AstonJ

AstonJ

If you’re on a Mac my guide here might be worth a look too: How to set-up a Ruby and Elixir dev environment on macOS – (via @AstonJ)

adamu

adamu

I see you’re asking questions about mix now, so assuming you resolved this. Could you share the solution?

Emily

Emily OP

I tried so many things… I should have kept better notes. I think the solution ended up being some missing dependencies upstream.

Emily

Emily OP

Here’s what finally worked:

To set the version of Elixir:

  1. Open a terminal window.
  2. Navigate to your home directory by running the following command: cd ~
  3. Check if the .tool-versions file exists by running ls -a. If it doesn’t exist, create it by running touch .tool-versions.
  4. Open the .tool-versions file with a text editor of your choice. For example, you can use the following command to open it with nano: nano .tool-versions
  5. Add the following line to the file: elixir 1.13.2-otp-24.
  6. Save the changes and exit the text editor.

To check the current version of Elixir:

  1. Open a terminal window.
  2. Run the following command: elixir -v.

This will display the version of Elixir that is currently set on your system. If you’ve followed the steps above and set the version to 1.13.2-otp-24, then running elixir -v should display that version.

dimitarvp

dimitarvp

Same effect should be achievable by running asdf global elixir 1.13.2-otp-24 btw.

adamu

adamu

asdf global elixir 1.13.2-otp-24

That’s what I said in April, but Emily reported it didn’t work :man_shrugging:

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews