Mark Thomas Miller's logo

How to fix asdf's `ruby-build: definition not found`

June 1, 2021

I use asdf to manage my Ruby version, but I was getting the error "ruby-build: definition not found: X.X.X" when I was trying to upgrade to a newer version. It took me a while to find out exactly why this was happening, but I eventually learned that I needed to update Ruby from asdf like so:

asdf plugin-update ruby

After you run that, you can install your version of Ruby. Just replace X.X.X with the version number you want:

asdf install ruby X.X.X