Skip to content


enable Ruby environment on RHEL (ULN)

So far, I did Lisp, C, csh/ksh/bsh, perl. Now it seems to me that the wind is blowing stronger in the “infrastructure” than in the “administration” direction, which for me indicates the need for ruby…. or maybe it is just a fashion thing. I am not sure about it but I am sure that the time has come to learn Ruby, really.

On my RHEL 6 box, after a few installs of different ruby packages, I still could not get irb (the interactive ruby environment) to work…

# yum list installed | grep ruby | awk '{print $1}'
ruby.x86_64                  
ruby-libs.x86_64             
ruby200.x86_64               
ruby200-ruby.x86_64          
ruby200-ruby-irb.noarch      
ruby200-ruby-libs.x86_64     
ruby200-rubygem-bigdecimal.x86_64
ruby200-rubygem-io-console.x86_64
ruby200-rubygem-json.x86_64  
ruby200-rubygem-psych.x86_64 
ruby200-rubygem-rdoc.noarch  
ruby200-rubygems.x86_64      
ruby200-runtime.x86_64

It absolutely sucks! And it does it just the same every time I attempt to do something new without reading first the instruction to use! Well, what else can I say but – it is so entertaining!
Let’s start cleaning my own mess.

# yum -y remove ruby200 ruby200-ruby-libs ruby200-runtime

Next, I spent several minutes reading this link – http://developers.redhat.com/products/softwarecollections/get-started-rhel7-ruby/

I proceed anew, with the freshly acquired knowledge:

# yum install rh-ruby22

For this process to work, the host has to subscribe to the rhel-x86_64-server-optional-6 channel of your spacewalk/satellite or rhn. For RHEL 7 the 6 in the repo name changes to 7.
Now, I will use scl (Setup and run software from Software Collection environment) to enable and to add the just installed RH-Ruby 2.2 to my environment.

# scl enable rh-ruby22 bash

Next, the ultimate test – do i have irb or not?

# irb
irb(main):001:0> puts "Hello, Red Hat Developers World from Ruby " + RUBY_VERSION
Hello, Red Hat Developers World from Ruby 2.2.2
=> nil
irb(main):002:0> quit

Sweet! I have what I need to continue reading the “Computer Science Programming Basics with RUBY” by Ophir Frieder, Gideon Frieder, and David Grossman. Well, it is time to turn another page.

Posted in Linux.

Tagged with , , , , , , , .


0 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.



Some HTML is OK

or, reply to this post via trackback.

WordPress Anti Spam by WP-SpamShield



Copyright © 2016 - 2017 Waldemar Mark Duszyk. All Rights Reserved. Created by Blog Copyright.