mdiam
5/29/2008 3:03:00 PM
On 29 mai, 10:40, Eric Hodel <drbr...@segment7.net> wrote:
> 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 : ...
> > 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
> $ 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 ^^