asdf-vm / asdf-ruby

Ruby plugin for asdf version manager
https://github.com/asdf-vm/asdf
MIT License
650 stars 133 forks source link

The same OS and asdf version on 2 different machines shows different recent ruby versions to install #389

Closed mcampbell closed 5 months ago

mcampbell commented 5 months ago

I have 2 machines, one's a native Linux, the other is a WSL running on a different box, but both are on the same version of Ubuntu, yet asdf shows different versions of available "ruby" to install. Why is this, and how do I get the first one to "see" more recent ruby versions?

Machine 1 (Native Linux)

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
> asdf --version
v0.14.0-ccdd47d
> asdf list all ruby | grep '^3' | tail -5
3.1.0
3.1.1
3.1.2
3.2.0-dev
3.2.0-preview1

Machine 2 (WSL)

> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.4 LTS
Release:        22.04
Codename:       jammy
> asdf --version
v0.14.0-ccdd47d
> asdf list all ruby | grep '^3' | tail -5
3.3.0-preview2
3.3.0-preview3
3.3.0-rc1
3.3.0
3.4-dev
Stratus3D commented 5 months ago

Please provide the output of asdf info on both machines.

mcampbell commented 5 months ago

Machine 1 native linux

❯ asdf info
OS:
Linux mcampbell-media-server 6.5.0-25-generic #25~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Feb 20 16:09:15 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

BASH VERSION:
5.1.16(1)-release

ASDF VERSION:
v0.14.0-ccdd47d

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/mcampbell/.asdf
ASDF_DIR=/home/mcampbell/.asdf
ASDF_CONFIG_FILE=/home/mcampbell/.asdfrc

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 05f99c3
ruby                         https://github.com/asdf-vm/asdf-ruby.git master 368792a

Machine 2 (WSL)

 ❯ asdf info
OS:
Linux DESKTOP-HGH90A6 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
zsh 5.8.1 (x86_64-ubuntu-linux-gnu)

BASH VERSION:
5.1.16(1)-release

ASDF VERSION:
v0.14.0-ccdd47d

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/mcampbell/.asdf
ASDF_DIR=/home/mcampbell/.asdf
ASDF_CONFIG_FILE=/home/mcampbell/.asdfrc

ASDF INSTALLED PLUGINS:
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 9275f49
ruby                         https://github.com/asdf-vm/asdf-ruby.git master f01524b
yarn                         https://github.com/twuni/asdf-yarn.git main 376c540
monfresh commented 5 months ago

It looks like your native linux machine has an outdated ruby plugin from 2022. Try updating it: asdf plugin update ruby.

mcampbell commented 5 months ago

Thanks, all; this solved it. Will pay more attention in the future.