skip to Main Content

I am currently using Ruby version 3.2.2 on Ubuntu 22.04, which I installed using asdf. I would like to upgrade to version 3.3.0.

When I run asdf install ruby 3.3.0, I keep getting the error message ruby-build: definition not found: 3.3.0.

Can anyone guide me on how to upgrade my Ruby version to 3.3.0 using asdf?

I have tried running asdf install ruby 3.3.0 where I expected it to upgrade my version to Ruby 3.3.0.

2

Answers


  1. Chosen as BEST ANSWER

    Updating asdf plugin using the following command asdf plugin update ruby has worked for me. You should be able to install 3.3.0 afterwards.


  2. Here’s how I do it using devops to make my version predictable:

    1. I update all the languages I use, because why not? You’ll see which ones get a new version to install:
    $ asdf plugin update --all
    
    1. I look and see what versions of Ruby are available. And hey! Ruby 3.3.0 is there:
    $ asdf list all ruby
    
    1. Then, to keep things sane and devops, I edit the Ruby entry in whatever project I want to use it. Or, maybe I’ll just make it the default for my user account:
    $ vi ~/.tool-versions
    

    This opens up my current defaults, which I edit to change the ruby line:

    elixir 1.16.0-otp-26
    erlang 26.1.2
    gleam  0.33.0
    python 3.12.1
    ruby   3.3.0
    
    1. For the last step, I install the new version the easy way. This looks at the nearest .tool-versions and installs them:
    $ asdf install
    

    You can verify you’re running the new version like this:

    $ ruby -v                                                                                   
    Could not locate Gemfile or .bundle/ directory
    ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [arm64-darwin23]
    

    Finally, this isn’t required, but I always update the essentials when I install a new interpreter:

    $ gem update --system ; gem update bundler
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search