joeerl
Creator of Erlang - Fondly Remembered
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questions.
I want to start of with the “latest and greatest” so that my questions when I get stuck are relevant. So
- What do I need and how do I get them
I think I need Elixir Erlang and Mix and possibly Hex
I have in the past installed all of these - so my file system is a bit of a historical mess - so
- how do I find out which versions I already have?
- how do I find out the latest versions?
- how do do I update to the latest versions?
- how do I delete old versions if they are not needed?
I realize I can find the answers to all these questions by Googling and experimentation but it would be very nice to find the answers “all in one place”
The “brew doctor” command is pretty good at flushing out old systems and telling me what to do - so it would be very nice if there was an equivalent command - let me daydream a bit:
> elixir doctor
Wow Joe you already have elixir installed
but it's a really old version ...
you might like to delete the old version with 'elixir
remote_old_versions'
and then do 'elixir upgrade'
....
Cheers
/Joe
Trending in Questions
Hey guys,
I’ve got a huge CSV ( around 10 GB ) that needs to be processed hourly
Do you guys have any suggestions what is the best prac...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I have what I’ve heard referred to as a “lookup table” in my database. This is a way of assigning codes to common values. One common lo...
New
What approach to take when sending live updates to “random” users Hi! I have a question, I have a little chat app, and when I create a DM...
New
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
Anyone here using Honeybadger?
My Honeybadger account is being overwhelmed with noise from some bots. Seeing a lot of
Bandit.HTTPError...
New
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
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
cpgo
Im a big fan of GitHub - asdf-vm/asdf: Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more · GitHub.
You can manage a multitude of language versions, including elixir and erlang and set up global or per project versions.
NobbZ
You can find out the current version using
elixir --versionor by just entering the REPL,iex, it will show you a nice banner about your Erlang and elixir environment.Hex is usually kept up to date by mix. It will tell you when it needs an update and how you can update then.
How you update and remove Erlang and elixir dies massively depend on how you installed it originally. Also you may want or may not want to remove
~/.mixafter you have removed elixir.AstonJ
Welcome back Joe
As @cpgo mentioned, it’s often beneficial to have multiple versions of languages installed as some projects may depend on different versions. For this we use an Elixir version manager (like ASDF).
As mention by @NobbZ, Mix is installed with Elixir.
If you use a language version manager then you may find you don’t need to uninstall older versions, but if you do the method will depend on which version manager you use.
I would recommend most people use a language version manager because you may need to work on older projects that are tied to older versions of languages. They are also used in production - so a server can host different apps using different versions of languages or frameworks. Some LVMs can even compartmentalise packages (such as Gems if you’re using a language such as Ruby) so that they are only loaded for that specific app/version (so are therefore more efficient/performant for the server).
Have a look here to see some of the version managers available for Elixir:
If you have any other questions or you’d rather not use a LVM, let us know how you have installed previous versions and we can help with how to remove them.
peerreynders
As you seem to be using
homebrewyou can use$ brew list FORMULA:to upgrade simply follow the usual
homebrewprocess:and then
For that command to work Erlang and Elixir have to be on the
PATH. So in your~/.bash_profilethere should be something like:Cleanup:
amnu3387
One more for asdf GitHub - asdf-vm/asdf: Extendable version manager with support for Ruby, Node.js, Elixir, Erlang & more · GitHub
If you want to remove all versions installed with brew and prevent it from installing again whenever you update brew, caution that this is non-reversible,
brew uninstall <name> --forceFor asdf, after installing and enabling it (first section on the GitHub page), you can do:
After you can do:
asdf list erlangOr whatever plugin, to list the installed versions
asdf list-all erlangTo show all available versions (if new versions have been released between the time you installed the plugin, you need to update the plugin to show the new ones, with
asdf plugin-update allorasdf plugin-update erlang)asdf currentTo show the current versions of all plugins, or
asdf current erlangto just show the current set erlang version. If done from a directory that has a local version specified it will show the local version that is set, anywhere else it will show the global oneasdf uninstall <name> <version>to uninstall a specific oneTo set the global versions to use
asdf global <name> <version>And when you want to pin down a version to use on a project, from the directory of the project,
asdf local <name> <version>To install hex, after having elixir installed
mix local.hexAnd if you want to use phoenix tasks to generate phoenix projects/applications,
mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ezdimitarvp
If you do not want multiple versions and need a centralized point then this is where I periodically check: Elixir releases on GitHub.
For my dev work I only use the latest version because I would like to know if a breaking change manages to sneak itself in the older projects or, much more likely, a package is very outdated – and if I should refactor something in those older projects so that they are not left behind and are upgradable should the need arise.
For macOS, a single
brew upgradeshould be absolutely enough.For Linux, this is how I setup my work VMs:
~/bin(one of the first things I do on my Linux machines).Precompiled.ziprelease from the link above.~/bin/elixir-x.y.z(replace with release version).Precompiled.zipin it.~/bin/elixir-x.y.z/binto $PATH, usually in~/.bashrcor~/.bash_profile.source ~/.bashrc.elixir -v. On Win10, mine prints out:rebarandmixwith their latest versions):mix local.rebar --forcemix local.hex --forceOf course, if you want the latest Elixir with the latest OTP, there are extra steps required – like compiling Elixir yourself, or using a language version manager (I think
asdfallows you to specify which version of Erlang/OTP you want Elixir compiled against).Any further questions, we will help.
webuhu
Hello Joe,
it’s always the same pain in digging back or generally in using different programming languages time by time. You’ll need to find the way back…
So this is my personal opinion and solution to your questions.
You’ll need Nix and a little .nix file and it’ll maybe solve the rest of your questions.
You’ll get it here: https://nixos.org/nix/download.html
The .nix file you’ll need - call it
default.nixand put it into the root of your working project directory:Then to get started in using the “latest” Elixir version you’ll only need to remember one command
nix-shell -A env- and you’ll be sitting in a shell with Elixir.If you really got the latest Elixir version is dependent on the up-to-dateness of Elixir within the Nix Packages Collection and of course your default.nix file.
It really is the easiest to visit: https://github.com/elixir-lang/elixir/releases
nix-collect-garbage -dThe main benefits why I’m working with & on this solution is I can lock the Nix Packages Collection to a certain version within my project and can be shure every one else working on the project can very easily use the exact same Erlang & Elixir version.
Of course maybe one of the other mentioned version managers can do the same, but I’m in need of a language independend and flexible solution.
By the way Nix has more then this arguments to deliver.
ryanwinchester
I know this is old but I’m here to not preach language version managers or anything and just offer the simplest most straightforward upgrade since you mentioned you are using homebrew?
Upgrading Elixir if it was installed with homebrew is pretty easy. Erlang is a dependency that will be installed or updated for you by homebrew as needed.
brew updatebrew upgrade elixirelixir --version(I never do
brew upgradewithout a specfic formula, as that has caused me many headaches in the past)Happy Elixiring!
GermaVinsmoke
Any way to maintain multiple versions of Elixir on windows?
crispinb
I’m sure there’s a thread somewhere about this but couldn’t find it with a quick search. I have a feeling you can sort-of do it with chocolatey, so perhaps that’s worth pursuing.
All that’s assuming you want native windows builds. If you’re willing & able to use wsl, then asdf works beautifully there.