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 > Can't get gems to work (1.9, Windows)
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Can't get gems to work (1.9, Windows)

Réponse
 
LinkBack Outils de la discussion
Vieux 02/04/2008, 02h33   #1
jana.koivu@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Can't get gems to work (1.9, Windows)

Hi,

I can't get gems to work in my 1.9 install. Can anyone ?

The gem command worked ('gem install log4r'), but when I try to
include it from a script, I just get 'no such file to load'.

The gem got installed into the directory 'c:\LAN'. Does that seem
correct?

If I use filemon or procmon while running my script, I notice that
Ruby is *only* searching the directories under c:\ruby-1.9\lib\ruby.

I've tried changing RUBYOPTS, GEM_PATH, GEM_HOME, to no avail.

Jana

  Réponse avec citation
Vieux 02/04/2008, 06h24   #2
Christopher Dicely
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't get gems to work (1.9, Windows)

On Tue, Apr 1, 2008 at 6:35 PM, <jana.koivu@gmail.com> wrote:
> Hi,
>
> I can't get gems to work in my 1.9 install. Can anyone ?
>
> The gem command worked ('gem install log4r'), but when I try to
> include it from a script, I just get 'no such file to load'.
>
> The gem got installed into the directory 'c:\LAN'. Does that seem
> correct?
>
> If I use filemon or procmon while running my script, I notice that
> Ruby is *only* searching the directories under c:\ruby-1.9\lib\ruby.
>
> I've tried changing RUBYOPTS, GEM_PATH, GEM_HOME, to no avail.
>
> Jana


Ruby Gems seems to have a broken default install-dir in the released
Windows build of 1.9; other comments I've seen suggest that using an
explicit --install-dir pointing to the right directory should solve
that problem.

  Réponse avec citation
Vieux 02/04/2008, 12h21   #3
jana.koivu@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't get gems to work (1.9, Windows)

On Apr 2, 1:24am, Christopher Dicely <cmdic...@gmail.com> wrote:
> On Tue, Apr 1, 2008 at 6:35 PM, <jana.ko...@gmail.com> wrote:
> > Hi,

>
> > I can't get gems to work in my 1.9 install. Can anyone ?

>
> > The gem command worked ('gem install log4r'), but when I try to
> > include it from a script, I just get 'no such file to load'.

>
> > The gem got installed into the directory 'c:\LAN'. Does that seem
> > correct?

>
> > If I use filemon or procmon while running my script, I notice that
> > Ruby is *only* searching the directories under c:\ruby-1.9\lib\ruby.

>
> > I've tried changing RUBYOPTS, GEM_PATH, GEM_HOME, to no avail.

>
> > Jana

>
> Ruby Gems seems to have a broken default install-dir in the released
> Windows build of 1.9; other comments I've seen suggest that using an
> explicit --install-dir pointing to the right directory should solve
> that problem.


Hi Christopher, thank-you.

I can use --install-dir to force gem to install into the proper place,
but ruby still doesn't find the gem when I run my script:

> \ruby-1.9\bin\gem.bat install --install-dir c:\ruby-1.9\lib\ruby\gems\1.9.0 log4r

Bulk updating Gem source index for: http://gems.rubyforge.org
Successfully installed log4r-1.0.5
1 gem installed
Installing ri documentation for log4r-1.0.5...
Installing RDoc documentation for log4r-1.0.5...

> \ruby-1.9\bin\ruby -e "require 'log4r'"

-e:1:in `require': no such file to load -- log4r (LoadError)
from -e:1:in `<main>'

Filemon tells me that the only places that ruby is searching for the
library are:

lib\ruby\site_ruby
lib\ruby\vendor_ruby
lib\ruby\1.9.0

How do I get it to search the gems directory?

Jana
  Réponse avec citation
Vieux 02/04/2008, 15h18   #4
Christopher Dicely
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Can't get gems to work (1.9, Windows)

On Wed, Apr 2, 2008 at 4:25 AM, <jana.koivu@gmail.com> wrote:
> On Apr 2, 1:24 am, Christopher Dicely <cmdic...@gmail.com> wrote:
>
>
> > On Tue, Apr 1, 2008 at 6:35 PM, <jana.ko...@gmail.com> wrote:
> > > Hi,

> >
> > > I can't get gems to work in my 1.9 install. Can anyone ?

> >
> > > The gem command worked ('gem install log4r'), but when I try to
> > > include it from a script, I just get 'no such file to load'.

> >
> > > The gem got installed into the directory 'c:\LAN'. Does that seem
> > > correct?

> >
> > > If I use filemon or procmon while running my script, I notice that
> > > Ruby is *only* searching the directories under c:\ruby-1.9\lib\ruby.

> >
> > > I've tried changing RUBYOPTS, GEM_PATH, GEM_HOME, to no avail.

> >
> > > Jana

> >
> > Ruby Gems seems to have a broken default install-dir in the released
> > Windows build of 1.9; other comments I've seen suggest that using an
> > explicit --install-dir pointing to the right directory should solve
> > that problem.

>
> Hi Christopher, thank-you.
>
> I can use --install-dir to force gem to install into the proper place,
> but ruby still doesn't find the gem when I run my script:
>
> > \ruby-1.9\bin\gem.bat install --install-dir c:\ruby-1.9\lib\ruby\gems\1.9.0 log4r

> Bulk updating Gem source index for: http://gems.rubyforge.org
> Successfully installed log4r-1.0.5
> 1 gem installed
> Installing ri documentation for log4r-1.0.5...
> Installing RDoc documentation for log4r-1.0.5...
>
> > \ruby-1.9\bin\ruby -e "require 'log4r'"

> -e:1:in `require': no such file to load -- log4r (LoadError)
> from -e:1:in `<main>'
>
> Filemon tells me that the only places that ruby is searching for the
> library are:
>
> lib\ruby\site_ruby
> lib\ruby\vendor_ruby
> lib\ruby\1.9.0
>
> How do I get it to search the gems directory?



That's odd. I think my Ruby 1.9.0-on-Windows-fu has been exhausted
(I just remember the problem with installing gems into the wrong directory
and the fix; I remember running into enough quirks that I decided to restrict
myself to 1.8 until there is a 1.9 One-Click-Installer, or at least a
new release
of 1.9 for Windows.)

  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 08h07.


É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,10526 seconds with 12 queries