Ruby 3.0 : Install2022/06/17 |
Install Ruby 3.0.
|
|
[1] | Install Ruby 3.0 and try to run test script. |
[root@dlp ~]# dnf -y install ruby Dependencies resolved. ================================================================================ Package Arch Version Repository Size ================================================================================ Installing: ruby x86_64 3.0.3-159.el9 appstream 42 k Installing dependencies: ruby-libs x86_64 3.0.3-159.el9 appstream 3.3 M rubygem-json x86_64 2.5.1-159.el9 appstream 60 k rubygem-psych x86_64 3.3.2-159.el9 appstream 60 k Installing weak dependencies: ruby-default-gems noarch 3.0.3-159.el9 appstream 46 k rubygem-bigdecimal x86_64 3.0.0-159.el9 appstream 56 k rubygem-bundler noarch 2.2.32-159.el9 appstream 454 k rubygem-io-console x86_64 0.5.7-159.el9 appstream 27 k rubygem-rdoc noarch 6.3.3-159.el9 appstream 442 k rubygems noarch 3.2.32-159.el9 appstream 304 k Transaction Summary ================================================================================ Install 10 Packages ..... .....[root@dlp ~]# ruby -v ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [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 |
|