PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > rubygems 0.9.5 install issue
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
rubygems 0.9.5 install issue

Réponse
 
LinkBack Outils de la discussion
Vieux 04/12/2007, 19h04   #1
Kyle Schmitt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut rubygems 0.9.5 install issue

I was attempting to install rubygems on a machine that has, and
otherwise runs ruby just fine (installed in /usr/local/).
every attempt at installing rubygems ends the same way:
after a slew of install -c lines that are fine, I get this
/lib/rubygems/custom_require.rb:27:in `gem_origonal_require' : no
such file to load -- socket (LoadError)

(there's more to the error, but that machine has no network right now,
and I don't feel like typing it all

Thanks in advance.

--Kyle

  Réponse avec citation
Vieux 04/12/2007, 22h41   #2
John Sheahan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rubygems 0.9.5 install issue

I just had the exact same problem and solved it by installing/compiling
rubygems in a directory that is in my path. I used /usr/local and
everything came up fine.

jackster

Kyle Schmitt wrote:
> I was attempting to install rubygems on a machine that has, and
> otherwise runs ruby just fine (installed in /usr/local/).
> every attempt at installing rubygems ends the same way:
> after a slew of install -c lines that are fine, I get this
> ./lib/rubygems/custom_require.rb:27:in `gem_origonal_require' : no
> such file to load -- socket (LoadError)
>
> (there's more to the error, but that machine has no network right now,
> and I don't feel like typing it all
>
> Thanks in advance.
>
> --Kyle


--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 05/12/2007, 19h46   #3
Kyle Schmitt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rubygems 0.9.5 install issue

John, I'm not sure I follow about compiling it in a directory in your
path. You mean copying the installer into /usr/local/bin, then
running it?

I've set my PATH to include /usr/local/bin (which includes ruby) to no avail.

Still trying.
--Kyle

  Réponse avec citation
Vieux 05/12/2007, 20h13   #4
John Sheahan
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rubygems 0.9.5 install issue

I copied the install files to /usr/local and installed it there and got
past this error.

jackster


Kyle Schmitt wrote:
> John, I'm not sure I follow about compiling it in a directory in your
> path. You mean copying the installer into /usr/local/bin, then
> running it?
>
> I've set my PATH to include /usr/local/bin (which includes ruby) to no
> avail.
>
> Still trying.
> --Kyle


--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 06/12/2007, 15h15   #5
Kyle Schmitt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rubygems 0.9.5 install issue

*cough cough*
apparently there was an error in the ruby install, and it was missing
the socket library
*DOH*
--Kyle

  Réponse avec citation
Vieux 06/12/2007, 15h18   #6
jackster the jackle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rubygems 0.9.5 install issue

so you're up and running?

Kyle Schmitt wrote:
> *cough cough*
> apparently there was an error in the ruby install, and it was missing
> the socket library
> *DOH*
> --Kyle


--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 06/12/2007, 20h18   #7
Kyle Schmitt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rubygems 0.9.5 install issue

Hu. I thought the rebuild with no errors was proof it was good, but
socket was still missing. Apparently I had to pass --disable-ipv6 to
get the extensions to build clean on this box. The funny thing is,
that's not an option ./configure -- lists.

Anyway, not rubygems installed clean.

Thanks for the .
--Kyle

  Réponse avec citation
Vieux 06/12/2007, 21h31   #8
jackster the jackle
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: rubygems 0.9.5 install issue

Kyle...it doesn't seem to be over for me...

My gems finally installed ok and I was able to pull down several gems
successfully. But now, I'm trying to run a simple script that uses
require "snmp" to poll some networking devices and I'm getting the
following error:

/snmp.rb:6: uninitialized constant SNMP (NameError)
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
gem_original_require'
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
from ./snmp.rb:5

I successfully installed the following 3 gems:
snmp (1.0.1)
snmpscan (0.1)
snmptop (0.0.1)

Here is the code in snmp.rb:

#!/usr/local/bin/ruby
require "ruby gems"
require "snmp"
SNMP::Mangager.open(:Host => "172.30.152.1") do |m| response =
m.get(["syslocation.0", "sysuptime.0"]) response.each_varbind { |vb|
puts "#{vb.name}: #{vb.value}" } end

It looks to me like ruby isn't finding the snmp gem that I installed?

Do you have any ideas that might me now :-)

thanks
jackster




Kyle Schmitt wrote:
> Hu. I thought the rebuild with no errors was proof it was good, but
> socket was still missing. Apparently I had to pass --disable-ipv6 to
> get the extensions to build clean on this box. The funny thing is,
> that's not an option ./configure -- lists.
>
> Anyway, not rubygems installed clean.
>
> Thanks for the .
> --Kyle


--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h18.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,27257 seconds with 16 queries