|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
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 -- Posted via http://www.ruby-forum.com/. |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
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 |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
>> -------------- >> > > 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-forum.com/. |
|
![]() |
| Outils de la discussion | |
|
|