Gem error on "require 'rubygems'"

L

Luc Juggery

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
 
B

Bil Kleb

Luc said:
Hello RubyComminity !!!!
Hello.

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

Do you have an idea of what went wrong ?

Do you have RubyGem Hoe 1.1.2 installed? I.e.,
what does

gem list hoe

indicate?

Regards,
 
L

Luc Juggery

Hello Bill,

I guess it should not installed......

C:\temp\Ruby\graph>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" list hoe
*** LOCAL GEMS ***
C:\temp\Ruby\graph>

I have installed it and a couple of other gems required.
Then I tried to installed RMagick and got the following:

-----
C:\Documents and Settings\x0001027\Desktop>"c:\ruby\bin\ruby.exe"
"c:\ruby\bin\gem" install rmagick-1.14.1
Attempting local installation of 'rmagick-1.14.1'
Building native extensions. This could take a while...
gem_extconf.rb:38: undefined method `exitstatus' for nil:NilClass
(NoMethodError)
ERROR: Error installing gem rmagick-1.14.1[.gem]: ERROR: Failed to
build gem native extension.
Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.14.1 for inspection.
ruby gem_extconf.rb install rmagick-1.14.1\n
sh configure
----

I have ImageMagick 6.3.0 installed.

Thanks a lot,

Luc
 
T

Timothy Hunter

Luc said:
Hello Bill,

I guess it should not installed......

C:\temp\Ruby\graph>"c:\ruby\bin\ruby.exe" "c:\ruby\bin\gem" list hoe
*** LOCAL GEMS ***
C:\temp\Ruby\graph>

I have installed it and a couple of other gems required.
Then I tried to installed RMagick and got the following:

-----
C:\Documents and Settings\x0001027\Desktop>"c:\ruby\bin\ruby.exe"
"c:\ruby\bin\gem" install rmagick-1.14.1
Attempting local installation of 'rmagick-1.14.1'
Building native extensions. This could take a while...
gem_extconf.rb:38: undefined method `exitstatus' for nil:NilClass
(NoMethodError)
ERROR: Error installing gem rmagick-1.14.1[.gem]: ERROR: Failed to
build gem native extension.
Gem files will remain installed in
c:/ruby/lib/ruby/gems/1.8/gems/rmagick-1.14.1 for inspection.
ruby gem_extconf.rb install rmagick-1.14.1\n
sh configure
----

I have ImageMagick 6.3.0 installed.

Thanks a lot,

Luc
The "rmagick" gem is for *nix installs. Use the rmagick-win32 gem for Win32.
http://rmagick.rubyforge.org/install-faq.html#win
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top