As a new web programmer (or maybe as a seasoned one), and as you google your way on learning new technologies, chances are you will be following the official how-to instructions provided by the specific programming language or whatever tools you may want to install on your computer. In case of ruby, you might end up following this guide Installing Ruby. That would be a logical approach, however probably a naïve one.
The truth of the matter is, in terms of web development, you’ll be needing way more than one version of ruby installed on your computer. You may have to use
To save yourself some trouble, it would be wise to use all-in-one versions manager whenever it is possible, here we can use asdf. It’s a tool to manage each of your project runtimes with a single CLI tool and command interface.
For instance, my user config file looks like below, this shows all the runtimes that works on my computer, some are for work projects, and some are personal learning agenda, whatever language or tool I might fancy playing around with.
Meanwhile a project specific config might look like
Similar to other language specific versions manager (
phpenv etc), asdf switches to correct runtime versions as you switch to your project folder. Installing missing runtime version is as simple as running
If you are working on a existing project that uses other version manager, you can add
.asdfrc file on your project folder.
legacy_version_file = yes
This will detect any legacy version file (eg;
.ruby-version) on your folder and use it as fallback when not listed on project’s .tool-versions config file. However, it would be ideal if the project will be migrated to using this tool (which shouldn’t be too hard) so that teams uses the exact same versions of tools with support for many tools via a plugin system, and the simplicity and familiarity of being a single Shell script you include in your Shell config.
In conclusion, asdf serves as a valuable tool in your web development arsenal, easing the burden of managing multiple runtime versions and allowing you to focus on what truly matters – building remarkable projects and advancing your skills in the dynamic world of web programming. So, take a leap forward, embrace asdf, and unlock the true potential of your local development environment.
Thanks for reading, no matter your software problem, we provide a complete solution to scope, design, develop, test, host, maintain and support it 24/7/365. Contact us to find out how can we bring your ideas to reality!