How to write,compile and run RUBY in linux

Posted: 2 Mar 2017 in ruby
Tags: , ,

Learn  how to write compile and run RUBY programming in Linux.This tutorial is for all those RUBY Programmers who are interested in developing some linux application using RUBY Program or Linux Users who are interested in learning RUBY Programming language to enhance their skills. here i have mentioned RUBY programming compiler, along with how to write ruby program in linux and how to compile and run it.

Step 1: Install Ruby Program Compiler.

[root@localhost ~]# yum install ruby* -y

 

Step 2: Write and save Ruby Program

 

[root@localhost ~]# cat > hacking.rb
puts " hell this is Ethical Hacking Tuition center"
puts " here you learn CCNA LINUX HACKING WORDPRESS "
puts "Special Batches For Cyber security and IPv6 "
puts "Ethical Hacking new batch is Starting From next WEEK"
[root@localhost ~]#

 

Step 3: Assign execute permission to your ruby Program.

 

[root@localhost ~]# chmod 755 hacking.rb

 

Step 4: Run the ruby  Program named hacking.rb

 

[root@localhost ~]# ruby hacking.rb
 hell this is Ethical Hacking Tuition center
 here you learn CCNA LINUX HACKING WORDPRESS
Special Batches For Cyber security and IPv6
Ethical Hacking new batch is Starting From next WEEK

 

 

Advertisement

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com 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.