[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby/IRB not seeing installed Gems, thoughts?

Matthew Williams

1/6/2008 12:22:00 AM

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.rub...
--
Posted via http://www.ruby-....

2 Answers

Luis Lavena

1/6/2008 12:54:00 AM

0

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

Matthew Williams

1/6/2008 1:01:00 AM

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,


Thanks, what a major duh moment. Just needed a second set of eyes.
--
Posted via http://www.ruby-....