Ruby/IRB not seeing installed Gems, thoughts?

  • Thread starter Matthew Williams
  • Start date
M

Matthew Williams

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
 
L

Luis Lavena

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,
 
M

Matthew Williams

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top