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 > Ruby/IRB not seeing installed Gems, thoughts?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Ruby/IRB not seeing installed Gems, thoughts?

Réponse
 
LinkBack Outils de la discussion
Vieux 06/01/2008, 00h21   #1
Matthew Williams
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Ruby/IRB not seeing installed Gems, thoughts?

Using "gem query --local" I'm returned a list of installed gems, one of
which is called "relax".

However, within the IRB I cannot require this gem. Setting up a simple
Ruby script I cannot do an include on it either as it returns a message
that it can't find the gem.

-------------

irb(main):001:0> require 'relax'
LoadError: no such file to load -- relax
from (irb):1:in `require'
from (irb):1
irb(main):002:0> require 'test/unit'
=> true
irb(main):003:0>

--------------

This is the error returned when running demo code for the gem itself:
/flickr.rb:8: uninitialized constant Relax::API (NameError)
from test.rb:3:in `require'
from test.rb:3

Thoughts? I'm running on OSX. Could it be my Ruby install?

RubyGems Environment:
- RUBYGEMS VERSION: 1.0.1 (1.0.1)
- RUBY VERSION: 1.8.6 (2007-03-13 patchlevel 0) [powerpc-darwin8.10.0]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby
- RUBYGEMS PLATFORMS:
- ruby
- powerpc-darwin-8
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 06/01/2008, 00h53   #2
Luis Lavena
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Ruby/IRB not seeing installed Gems, thoughts?

On 5 ene, 22:21, Matthew Williams <matthew.d.willi...@gmail.com>
wrote:
> Using "gem query --local" I'm returned a list of installed gems, one of
> which is called "relax".
>
> However, within the IRB I cannot require this gem. Setting up a simple
> Ruby script I cannot do an include on it either as it returns a message
> that it can't find the gem.
>
> -------------
>
> irb(main):001:0> require 'relax'
> LoadError: no such file to load -- relax
> from (irb):1:in `require'
> from (irb):1
> irb(main):002:0> require 'test/unit'
> => true
> irb(main):003:0>
>
> --------------
>


You didn't tried:

require 'rubygems'
require 'relax'

AFAIK, there is no RUBYOPT set under Darwin that automatically loads
rubygems.

Try doit manually.

HTH,
--
Luis Lavena

  Réponse avec citation
Vieux 06/01/2008, 01h01   #3
Matthew Williams
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Ruby/IRB not seeing installed Gems, thoughts?


>> --------------
>>

>
> You didn't tried:
>
> require 'rubygems'
> require 'relax'
>
> AFAIK, there is no RUBYOPT set under Darwin that automatically loads
> rubygems.
>
> Try doit manually.
>
> HTH,



Thanks, what a major duh moment. Just needed a second set of eyes.
--
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 03h39.


É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 ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10101 seconds with 11 queries