Ruby
Ruby is a dynamic, object-oriented programming language known for its simplicity and productivity. It powers frameworks like Ruby on Rails and is widely used for web development, scripting, and automation tasks. Ruby's elegant syntax and robust ecosystem make it a popular choice for developers.
Install Ruby
Run the below command to install Ruby in Mechanix OS (or any debian based distro)
$ sudo apt install ruby-full
After installation, verify that ruby
and gem
are properly installed:
$ ruby --version
$ gem --version
Running an example
Let's create a simple hello world program to test our Ruby installation.
1
Create a new directory, and a new source file for your Ruby program.
$ mkdir hello_ruby && cd hello_ruby
$ nano main.rb
2
Paste the following program in the editor
puts "Hello, Ruby!"
3
Now lets run the program using ruby
.
ruby hello.rb!
You have now successfully configured Ruby on your Comet ✨!