LoginSignup
1
0

asdf で Ruby の最新バージョンをインストール(したいけど最新バージョンが見つからないときは)

Posted at

ふつうは asdf install ruby latest でいけるはずですが、plugin の更新をしばらくしていないと最新バージョンを見つけられなかったりするみたいです。

naokid@myhost:~$ asdf list all ruby
~略~
3.1.4
3.2.0-dev
3.2.0-preview1  # あれれ、2023年08月現在は 3.2.2 までリリース済みのはずなのに・・・
artichoke-dev
jruby-dev
jruby-1.7.2
~略~

こんな時は asdf plugin-update ruby してやるとよいようです。
公式の README にこんな記述がありました。

Running asdf plugin-update ruby will update asdf-ruby and ensure the latest versions of ruby are available to install.

実際にやってみると「Already on 'master'」とか言われましたが、あらためて asdf list all ruby してみると確かに変化がありました。

naokid@myhost:~$ asdf plugin-update ruby
Updating ruby to master
From https://github.com/asdf-vm/asdf-ruby
   368792a..8cb9721  master     -> master
   368792a..8cb9721  master     -> origin/master
Already on 'master'
Your branch is up to date with 'origin/master'.
naokid@myhost:~$
naokid@myhost:~$ asdf list all ruby
~略~
3.1.4
3.2.0-dev
3.2.0-preview1
3.2.0-preview2
3.2.0-preview3
3.2.0-rc1
3.2.0
3.2.1
3.2.2
3.3.0-dev
3.3.0-preview1
artichoke-dev
jruby-dev
jruby-1.7.2
~略~

めでたしめでたし。

naokid@myhost:~$ asdf install ruby latest
To follow progress, use 'tail -f /tmp/ruby-build.20230810162020.15127.log' or pass --verbose
Downloading ruby-3.2.2.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
Installing ruby-3.2.2...
Installed ruby-3.2.2 to /home/naokid/.asdf/installs/ruby/3.2.2
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0