Skip to content

Updating Package does not update new Ruby Versions list #447

Open

Description

@SheW0lf

I use this plugin to manage my ruby versions, and a repo I constantly work in just updated to ruby 3.4.3. I ran asdf plugin update ruby per the docs, but then when I ran asdf list all ruby | grep 3.4 I got this:

1.8.7-p334
1.8.7-p374
1.9.3-p374
2.3.4
3.3.4
3.4.0-preview1
3.4.0-preview2
3.4.0-rc1
3.4.0
3.4-dev
3.4.1
3.4.2
jruby-9.3.4.0
rbx-3.4
rbx-3.40
rbx-3.41
rbx-3.42
rbx-3.43
rbx-3.44
rbx-3.45
rbx-3.46
rbx-3.47
rbx-3.48
rbx-3.49

No 3.4.3 in the list. After about 30 mins of troubleshooting, I decided to uninstall and re-install the plugin and now I see 3.4.3 in the list.
So it appears that the asdf plugin update ruby does not actually update the ruby versions that are available for download.

Activity

  1. rnestler commented on Apr 23, 2025

    @rnestler

    I'm hitting the same issue and for some reason the ASDF_RUBY_BUILD_VERSION in ~/.asdf/plugins/ruby/lib/utils.sh is downgraded? I didn't do this manually:

    ~/.asdf/plugins/ruby/ruby-build (git)-[master] % git status
    On branch master
    Your branch is up to date with 'origin/master'.
    
    Changes to be committed:
      (use "git restore --staged <file>..." to unstage)
    	modified:   ../lib/utils.sh
    ~/.asdf/plugins/ruby/ruby-build (git)-[master] % git diff --cached
    diff --git a/lib/utils.sh b/lib/utils.sh
    index 31d322e..aa9be9b 100644
    --- a/lib/utils.sh
    +++ b/lib/utils.sh
    @@ -1,6 +1,6 @@
     #!/usr/bin/env bash
    
    -RUBY_BUILD_VERSION="${ASDF_RUBY_BUILD_VERSION:-v20250418}"
    +RUBY_BUILD_VERSION="${ASDF_RUBY_BUILD_VERSION:-v20250409}"
     RUBY_BUILD_TAG="$RUBY_BUILD_VERSION"
    
     echoerr() {

    ~/.asdf/plugins/ruby (git)-[master] % git restore --staged lib/utils.sh fixed it.

  2. serg-kovalev commented on Apr 23, 2025

    @serg-kovalev

    I'm hitting the same issue and for some reason the ASDF_RUBY_BUILD_VERSION in ~/.asdf/plugins/ruby/lib/utils.sh is downgraded? I didn't do this manually:

    ~/.asdf/plugins/ruby/ruby-build (git)-[master] % git status
    On branch master
    Your branch is up to date with 'origin/master'.

    Changes to be committed:
    (use "git restore --staged ..." to unstage)
    modified: ../lib/utils.sh
    ~/.asdf/plugins/ruby/ruby-build (git)-[master] % git diff --cached
    diff --git a/lib/utils.sh b/lib/utils.sh
    index 31d322e..aa9be9b 100644
    --- a/lib/utils.sh
    +++ b/lib/utils.sh
    @@ -1,6 +1,6 @@
    #!/usr/bin/env bash

    -RUBY_BUILD_VERSION="${ASDF_RUBY_BUILD_VERSION:-v20250418}"
    +RUBY_BUILD_VERSION="${ASDF_RUBY_BUILD_VERSION:-v20250409}"
    RUBY_BUILD_TAG="$RUBY_BUILD_VERSION"

    echoerr() {
    ~/.asdf/plugins/ruby (git)-[master] % git restore --staged lib/utils.sh fixed it.

    Exactly, the solution was to hard reset back and pull the latest changes. Now it works fine

  3. juanpaco commented on Apr 24, 2025

    @juanpaco

    I'm seeing the same dirty state in the plugin folder after running asdf plugin update ruby. What version of asdf are you all using? I saw this behavior with 0.16.7.

    I suspect it's an asdf issue, rather than a Ruby plugin issue, but I don't know enough about the inner workings to know for sure.

  4. dup2 commented on Apr 25, 2025

    @dup2

    Same problem here - seems like this is a real issue for everybody. Also using 0.6.17 of asdf via homebrew.

  5. kreintjes commented on Apr 30, 2025

    @kreintjes

    Same problem over here. I'm also using asdf 0.16.7.

    rnestler's suggestion fixed it :)

  6. MatheusRich commented on May 9, 2025

    @MatheusRich

    This fixed it for me:

    $ rm -r ~/.asdf/installs/ruby/3.4.3
    $ ASDF_RUBY_BUILD_VERSION=master asdf install ruby 3.4.3
  7. eizengan commented on May 28, 2025

    @eizengan

    I'm hitting the same issue and for some reason the ASDF_RUBY_BUILD_VERSION in ~/.asdf/plugins/ruby/lib/utils.sh is downgraded? I didn't do this manually:

    ~/.asdf/plugins/ruby/ruby-build (git)-[master] % git status
    On branch master
    Your branch is up to date with 'origin/master'.

    Changes to be committed:
    (use "git restore --staged ..." to unstage)
    modified: ../lib/utils.sh

    ~/.asdf/plugins/ruby/ruby-build (git)-[master] % git diff --cached
    diff --git a/lib/utils.sh b/lib/utils.sh
    index 31d322e..aa9be9b 100644
    --- a/lib/utils.sh
    +++ b/lib/utils.sh
    @@ -1,6 +1,6 @@
    #!/usr/bin/env bash

    -RUBY_BUILD_VERSION="${ASDF_RUBY_BUILD_VERSION:-v20250418}"
    +RUBY_BUILD_VERSION="${ASDF_RUBY_BUILD_VERSION:-v20250409}"
    RUBY_BUILD_TAG="$RUBY_BUILD_VERSION"

    echoerr() {

    ~/.asdf/plugins/ruby (git)-[master] % git restore --staged lib/utils.sh fixed it.

    This worked for me. Is it possible one or more the following .gitconfig options could be related to the issue, e.g. by unexpectedly stashing/popping a change onto the updated ruby-build branch? Do others experiencing this have these in their config as well?

    [merge]
    	autostash = true
    [pull]
    	rebase = true
    [rebase]
    	autostash = true
  8. exterm commented on Jul 28, 2025

    @exterm
    Contributor

    It seems that asdf should at least output some kind of error when there are staged changes in a plugin and you're running update

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions