Ruby is a simple and powerful scripting language used for web development, automation, and fast prototyping. Termux allows you to install Ruby directly on your Android device so you can run scripts and explore Ruby programming easily. Below are the installation steps and basic commands to help you get started.
Installation
Update all Termux packages:
pkg update && pkg upgrade -yInstall Ruby:
pkg install ruby -yCheck Ruby version:
ruby --versionCreate a Ruby file:
nano test.rbAdd this code:
puts "Hello Termux!"Run the file:
ruby test.rbBasic Commands
Run any Ruby script:
ruby filename.rbInstall gems (Ruby packages):
gem install package-nameList installed gems:
gem listShow Ruby help:
ruby --helpCheck gem help:
gem --helpUninstall Ruby:
pkg uninstall ruby