ASDF is a very interesting version manager with support for several programming languages through plugins.
This post shows a strange behavior I faced when I tried to use an old Ruby version in a Ruby on Rails application.
Installation
I installed Ruby 2.4.3 and set it locally without problems:
Error
Everything seemed fine until I try to install the gems for this version:
Checking the .tool-versions
file also displayed the expected version:
Solution
After some research, I found similar issues on Github but suggestions like run asdf reshim ruby
and “restart the terminal” didn’t work.
The actual problem was the message provided by asdf was not clear enough as pointed in this answer.
I wasn’t able to run bundle install
because I didn’t have bundler for this Ruby version.
Installing bundler solved the issue: