Gem error on "require 'rubygems'"

Hello RubyComminity !!!

I have decided to move to ruby to make the util script I usually do in
Perl.
I need to create a graph from an XML file.
For this, it seems that I can use gruff and magic/xml (not sure this
is the best choice as I am not familiar with those libs).

I have installed the gruff gem, that went fine.
Regarding magic/xml I have unzip the install and copy the folder in
“C:\ruby\lib\ruby\1.8” (is that enought ???)

Then I tried the gruff example:


#!/usr/bin/ruby

require ‘rubygems’
require ‘gruff’

g = Gruff::Line.new
g.title = “My Graph”

g.data(“Apples”, [1, 2, 3, 4, 4, 3])
g.data(“Oranges”, [4, 8, 7, 9, 8, 9])
g.data(“Watermelon”, [2, 3, 1, 5, 6, 8])
g.data(“Peaches”, [9, 9, 10, 8, 7, 9])

g.labels = {0 => ‘2003’, 2 => ‘2004’, 4 => ‘2005’}

g.write(‘my_fruity_graph.png’)


But I get the following error…

Gem::LoadError: Could not find RubyGem hoe (>= 1.1.2)

Do you have an idea of what went wrong ?
Also, I have to install all the gem locally as I am behind a proxy (do
not know if this can be linked)

Thanks a lot,

Luc

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs