Ubuntu 20 install Ruby 3
curl -fsSL https://github.com/rbenv/rbenv-installer/raw/HEAD/bin/rbenv-installer | bash
curl: (22) The requested URL returned error: 404
curl -fsSL https://raw.githubusercontent.com/rbenv/rbenv-installer/main/bin/rbenv-installer | bash
Installing rbenv with git…
Initialized empty Git repository in /root/.rbenv/.git/
Updating origin
remote: Enumerating objects: 2960, done.
remote: Counting objects: 100% (117/117), done.
remote: Compressing objects: 100% (66/66), done.
remote: Total 2960 (delta 62), reused 91 (delta 51), pack-reused 2843
Receiving objects: 100% (2960/2960), 577.31 KiB | 7.60 MiB/s, done.
Resolving deltas: 100% (1850/1850), done.
From https://github.com/rbenv/rbenv
* [new branch] master -> origin/master
* [new tag] v0.1.0 -> v0.1.0
* [new tag] v0.1.1 -> v0.1.1
* [new tag] v0.1.2 -> v0.1.2
* [new tag] v0.2.0 -> v0.2.0
* [new tag] v0.2.1 -> v0.2.1
* [new tag] v0.3.0 -> v0.3.0
* [new tag] v0.4.0 -> v0.4.0
* [new tag] v1.0.0 -> v1.0.0
* [new tag] v1.1.0 -> v1.1.0
* [new tag] v1.1.1 -> v1.1.1
* [new tag] v1.1.2 -> v1.1.2
* [new tag] v1.2.0 -> v1.2.0
Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.
Already on ‘master’
make: Entering directory ‘/root/.rbenv/src’
gcc -fPIC -c -o realpath.o realpath.c
gcc -shared -Wl,-soname,../libexec/rbenv-realpath.dylib -o ../libexec/rbenv-realpath.dylib realpath.o
make: Leaving directory ‘/root/.rbenv/src’
Installing ruby-build with git…
Cloning into ‘/root/.rbenv/plugins/ruby-build’…
remote: Enumerating objects: 12195, done.
remote: Counting objects: 100% (888/888), done.
remote: Compressing objects: 100% (302/302), done.
remote: Total 12195 (delta 604), reused 773 (delta 529), pack-reused 11307
Receiving objects: 100% (12195/12195), 2.54 MiB | 9.16 MiB/s, done.
Resolving deltas: 100% (8071/8071), done.
All done!
/root/.rbenv/bin/rbenv install 3.0.2
Downloading ruby-3.0.2.tar.gz…
-> https://cache.ruby-lang.org/pub/ruby/3.0/ruby-3.0.2.tar.gz
Installing ruby-3.0.2…
Installed ruby-3.0.2 to /root/.rbenv/versions/3.0.2