How to use the Interactive Ruby Shell to troubleshoot gems?

To start interactive Ruby Shell, type at the command prompt:

irb

At the irb prompt, type the following commands. Replace gem_name with the name of the gem that you want to test:
require 'rubygems'
require 'gem_name'

If result comes true then environment is set up correctly.

If result comes
LoadError: no such file to load -- gem_name then environment is not set up correctly. Ruby cannot load the specified gem. Type the following command:
p $LOAD_PATH
The $LOAD_PATH global variable stores an array that contains all of the directories Ruby searches when the load methods are called. 
 
Was this answer helpful?

Related Articles

How to install Ruby Gems?

To install gems we can use the gem command-line program. Log in to your Hostginger hosting...

How to set up one Ruby version with the cPanel Ruby Selector?

Log into your Hostginger hosting account. Check the available Ruby versions. Type the following...

How to set up multiple Ruby versions with the cPanel Ruby Selector?

Log in to cPanel account. If you are using the Jupiter theme, click Setup Ruby App under...