Skip to main content

Ruby: Notes

Ruby logo

Ruby - A programmer's best friend.

Ruby is simple in appearance, but is very complex inside, just like our human body. — Yukihiro “Matz” Matsumoto

Download and extract: https://rubyinstaller.org/downloads/

Add to PATH environment variable.

ruby --version
gem --version
irb : Interactive Ruby Shell

Install Ruby on Windows 10/11 using winget

PS F:\Projects\github\lthwruby> winget search ruby
Name                                   Id                                   Version      Match     Source
----------------------------------------------------------------------------------------------------------
Ruby Formatter                         9NN0RJL0D2NK                         Unknown                msstore
Ruby On Rails-simpleNeasyApp by WAGmob 9WZDNCRDN7Q9                         Unknown                msstore
InstantRuby                            9WZDNCRDC1W3                         Unknown                msstore
RubyGo                                 9P55T10JZJBC                         Unknown                msstore
Sonic Pi                               SonicPi.SonicPi                      3.3.1        Tag: ruby winget
Ruby 3.1 with MSYS2                    RubyInstallerTeam.RubyWithDevKit.3.1 3.1.2-1      Tag: ruby winget
Ruby 3.0 with MSYS2                    RubyInstallerTeam.RubyWithDevKit.3.0 3.0.4-1      Tag: ruby winget
Ruby 2.7 with MSYS2                    RubyInstallerTeam.RubyWithDevKit.2.7 2.7.6-1      Tag: ruby winget
Ruby 2.6 with MSYS2                    RubyInstallerTeam.RubyWithDevKit.2.6 2.6.10-1     Tag: ruby winget
Ruby 3.1                               RubyInstallerTeam.Ruby.3.1           3.1.2-1      Tag: ruby winget
Ruby 3.0                               RubyInstallerTeam.Ruby.3.0           3.0.4-1      Tag: ruby winget
Ruby 2.7                               RubyInstallerTeam.Ruby.2.7           2.7.6-1      Tag: ruby winget
Ruby 2.6                               RubyInstallerTeam.Ruby.2.6           2.6.10-1     Tag: ruby winget
MAMP & MAMP PRO                        MAMP.MAMP                            4.2.0        Tag: ruby winget
Laragon                                LeNgocKhoa.Laragon                   5.0.0.210523 Tag: ruby winget
RubyMine (EAP)                         JetBrains.RubyMine.EarlyAccess       223.4884.72  Tag: ruby winget
RubyMine                               JetBrains.RubyMine                   2022.2.3     Tag: ruby winget
EditPlus                               ES-Computing.EditPlus                5.6          Tag: ruby winget
PS F:\Projects\github\lthwruby> winget install RubyInstallerTeam.Ruby.3.1
Found Ruby 3.1 [RubyInstallerTeam.Ruby.3.1] Version 3.1.2-1
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-3.1.2-1/rubyinstaller-3.1.2-1-x64.exe
  ██████████████████████████████  13.9 MB / 13.9 MB
Successfully verified installer hash
Starting package install...
Successfully installed
PS F:\Projects\github\lthwruby>

PS F:\Projects\github\lthwruby> ruby --version
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
PS F:\Projects\github\lthwruby> gem --version
3.3.7

PS F:\Projects\github\lthwruby> gem which bundler
C:/Ruby31-x64/lib/ruby/3.1.0/bundler.rb
PS F:\Projects\github\lthwruby>

Learn Ruby | Codecademy

Ruby Tutorial | Tutorialspoint

Practice

>>> THM | Red Stone One Carat

Popular posts from this blog

Qubes OS: Fedora 30

Create a new Standalone VM based on fedora-29 VM template Extend root partition: run command on dom0 tuyen@dom0:~ $ qvm-volume extend fedora-30:root 12288MB Set qrexec_timeout to 600 seconds tuyen@dom0:~ $ qvm-pref --set fedora-30 qrexec_timeout 600 $ sudo dnf upgrade --refresh $ sudo dnf install dnf-plugin-sytem-upgrade $ sudo dnf system-upgrade download --release=30 Install fedora-30 template Run the following command on dom0 terminal $ sudo qubes-dom0-update qubes-template-fedora-30 Install Adobe Flash Player Adobe Flash Player will not go away soon. So, let's grab the latest version of Adobe Flash Player , then install using yum or dnf command. Verify if Adobe Flash Player is installed and works by visiting https://helpx.adobe.com/flash-player.html [user@fedora-30 ~]$ sudo dnf install Downloads/flash-player-npapi-32.0.0.238-release.x86_64.rpm Last metadata expiration check: 0:37:03 ago on Fri Aug 30 09:18:10 2019. Dependencies resolved. =========...

How to charge your device from USB Port

First of all, check BIOS Settings of your laptop or desktop Dell Look for USB PowerShare BIOS Settings: USB PowerShare Lenovo Look for Always On USB Charge in Off Mode BIOS Settings: Enable Always On USB Charge in Off Mode

Python: Free Online Courses

Ever thinking about which programming language to learn first? You can learn Python for free with these online courses.