Skip to content

Instantly share code, notes, and snippets.

@stonehippo
Last active February 24, 2024 02:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stonehippo/1c1e4225d215a6e21390a12d00e64347 to your computer and use it in GitHub Desktop.
Save stonehippo/1c1e4225d215a6e21390a12d00e64347 to your computer and use it in GitHub Desktop.
Programming language version managers

Programming language version managers

Keeping up to date with a program language installation isn't always easy. In particular, juggling the latest and greatest,legacy versions needed to maintain compatibility, keeping several versions of a langauge installed, or needing admin acess can be a real pain. The package manager included with your operating system, such as dpkg/apt or yum might help somewhat, but they usually cannnot handle multiple versions, typically want you to be an admin, and often do not have the most recent version available in their repos.

So what's an enterprising dev to do?

One answer is to install a dedicted tool for installing a managing a program language. These tools operate a bit like a language-specific package manager, with tools for installing, managing and swapping versions of a language. They operate by adjusting your path, often via a 'shim' pointing to a local install. They typically leave your system-installed versions alone. All in all, these tools are a huge boon to developers.

Nodejs/JavaScript

For Nodejs, you want to use the excellent Node Version Manager (or nvm).

Ruby

For Ruby, in my opinion, there's none better than rbenv. You could also check out rvm if you'd like an alternative.

Python

Python has had a split personality for quite a while now, with Python 2 and Python 3 living side by side for years. This has meant that many OS installs have both versions installed. But that might not be enough for you, so maybe you should check out pyenv, the rbenv-inspired tools for installing and managing multiple Pythons.

Got your own favorites?

If so, leave me a comment, and I'll look at adding the tool that help you keep installing youyr language of choice sane here, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment