Non standard installed gem question

Bonjour à tous,

I'm trying to install and use one particular gem in a non-standard
location.
I'd like to keep using both standard or non-standard installed gems.

I'v been able to install the "rgl" (Ruby Graph Library) in a personnal
directory
like this :

    export MY_GEMS=/home/.../pack/ruby/gems/1.8/
    gem install rgl -i $MY_GEMS -t --debug

But I'm unable to use it :

    export GEM_PATH=$MY_GEMS

    irb
    >require "rubygems"
    >gem "rgl"

gem "rgl"

Gem::LoadError: Could not find RubyGem rgl (>= 0.0.0)

  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:304:in
`report_activate_error'
  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:238:in
`activate'
  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:76:in
`active_gem_with_options'
  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:50:in `gem'
  from (irb):3

Thank you for any help
-- Maurice Diamantini

I cannot reproduce:

$ rm -rf ~/tmp/gems/
$ export MY_GEMS=~/tmp/gems
$ gem install rgl -i $MY_GEMS -t
[...]
3 gems installed
[...]
$ export GEM_PATH=$MY_GEMS
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> gem 'rgl'
=> true
irb(main):003:0> Gem.path
=> ["/Users/drbrain/tmp/gems", "/Library/Ruby/Gems/1.8"]

Check to see if irb is looking in the right spot ^^

···

On May 29, 2008, at 00:05 AM, mdiam wrote:

I'm trying to install and use one particular gem in a non-standard
location. I'd like to keep using both standard or non-standard installed gems.

I'v been able to install the "rgl" (Ruby Graph Library) in a personnal
directory like this :

   export MY_GEMS=/home/.../pack/ruby/gems/1.8/
   gem install rgl -i $MY_GEMS -t --debug

But I'm unable to use it :

   export GEM_PATH=$MY_GEMS

   irb

require "rubygems"
gem "rgl"

gem "rgl"

Gem::LoadError: Could not find RubyGem rgl (>= 0.0.0)

  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:304:in
`report_activate_error'
  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:238:in
`activate'
  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:76:in
`active_gem_with_options'
  from /opt/local/lib/ruby/vendor_ruby/1.8/rubygems.rb:50:in `gem'
  from (irb):3

Thank you for any help

> I'm trying to install and use one particular gem in a non-standard
> location. I'd like to keep using both standard or non-standard
> installed gems.
> I'v been able to install the "rgl" (Ruby Graph Library) in a personnal
> directory like this : ...
> But I'm unable to use it :

...
>>> gem "rgl"
> Gem::LoadError: Could not find RubyGem rgl (>= 0.0.0)>
> Thank you for any help

I cannot reproduce:

Hum, I also success thank's to your commands (perhaps I've done some
mistake
with my numerous trys, with several ruby versions (macport et apple)
and the various gems repositories I tested..)
But now I sure this was the way to go!

  rm -rf ~/tmp/gems/1.8
  export MY_GEMS=~/tmp/gems/1.8
  gem install rgl -i $MY_GEMS --no-rdoc --no-ri -y
  # (faster without docs)

  export GEM_PATH=$MY_GEMS

  irb

  require 'rubygems'
  # generaly return false !?

  gem 'rgl'
  # => true

  Gem.path
  # => ["/Users/diam/tmp/gems/1.8", "/opt/local/lib/ruby/gems/1.8"]

Thank your very much for your fast help!
-- Maurice

···

On 29 mai, 10:40, Eric Hodel <drbr...@segment7.net> wrote:

On May 29, 2008, at 00:05 AM, mdiam wrote:

$ rm -rf ~/tmp/gems/
$ export MY_GEMS=~/tmp/gems
$ gem install rgl -i $MY_GEMS -t
[...]
3 gems installed
[...]
$ export GEM_PATH=$MY_GEMS
$ irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> gem 'rgl'
=> true
irb(main):003:0> Gem.path
=> ["/Users/drbrain/tmp/gems", "/Library/Ruby/Gems/1.8"]

Check to see if irb is looking in the right spot ^^