Ruby

ruby 2.0.0p648 (2015-12-16) [x86_64-linux]  is installed on the compute nodes of the HPCC. Additionally you can enable ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]  with the

source /opt/rh/rh-ruby24/enable

  command.

Hello World

Create a file hello.rb

10.times do 
	puts "hello world"
end

and a bash script run.sh

# !/bin/bash
#$ -l m_mem_free=1G
#$ -j y
#$ -N hello

ruby hello.rb

Run the ruby code with qsub run.sh

This program will create a single file called hello.o<jobid>  with the following content:

hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world
hello world