[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Gem error on "require 'rubygems'"

Luc Juggery

10/27/2006 8:47:00 AM

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

4 Answers

Bil Kleb

10/27/2006 10:54:00 AM

0

Luc Juggery wrote:
> 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,
--
Bil Kleb
http://kleb.tadalist.com/lists/pub...

Luc Juggery

10/27/2006 11:27:00 AM

0

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

Tim Hunter

10/27/2006 12:17:00 PM

0

Luc Juggery wrote:
> 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-fa...


Luc Juggery

11/4/2006 12:56:00 PM

0

Thanks Timothy,
this is better now :-)

Luc