Ruby 3.3 : Install2024/06/04 |
Install Ruby 3.3.
|
|
[1] | Confirm the current enabled version of Ruby and Install 3.1. |
[root@dlp ~]# dnf module list ruby CentOS Stream 9 - AppStream Name Stream Profiles Summary ruby 3.1 common [d] An interpreter of object-oriented scripting language ruby 3.3 common [d] An interpreter of object-oriented scripting language Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled # if other versions are enabled, reset once and switch to the version [root@dlp ~]# dnf module -y reset ruby [root@dlp ~]# dnf module -y enable ruby:3.3
dnf module -y install ruby:3.3/common Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing group/module packages: ruby x86_64 3.3.0-1.module_el9+862+220991ec appstream 38 k Installing dependencies: ruby-default-gems noarch 3.3.0-1.module_el9+862+220991ec appstream 45 k ruby-libs x86_64 3.3.0-1.module_el9+862+220991ec appstream 4.1 M rubygem-io-console x86_64 0.7.1-1.module_el9+862+220991ec appstream 22 k rubygem-json x86_64 2.7.1-1.module_el9+862+220991ec appstream 56 k rubygem-psych x86_64 5.1.2-1.module_el9+862+220991ec appstream 57 k Installing weak dependencies: rubygem-bigdecimal x86_64 3.1.5-1.module_el9+862+220991ec appstream 65 k rubygem-bundler noarch 2.5.3-1.module_el9+862+220991ec appstream 474 k rubygem-rdoc noarch 6.6.2-1.module_el9+862+220991ec appstream 502 k rubygems noarch 3.5.3-1.module_el9+862+220991ec appstream 381 k Installing module profiles: ruby/common Transaction Summary ================================================================================ Install 10 Packages ..... .....[root@dlp ~]# ruby -v ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-linux] # verify to create test script
[root@dlp ~]# cat > ruby_test.rb <<'EOF'
msg = Class.send(:new, String);
mymsg = msg.send(:new, "Hello Ruby World !\n");
STDOUT.send(:write, mymsg)
EOF
[root@dlp ~]# ruby ruby_test.rb Hello Ruby World ! |
Sponsored Link |