First Ruby Program

Before you start your first ruby program. Must sure that, You installed it.

If you don’t know how to install ruby, Please refer this link for a proper guideline : Link

Now, Open any text editor and write this program to check the first ruby program:

puts "Welcome to Ruby" 

Save this file as “first.rb”

Note: Save Ruby program with .rb extension

Now, Using Terminal go to file path and type this command:

ruby first.rb

In the next line, You will get an output as:

Welcome to Ruby

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.