$LOAD_PATH problem when creating rake task

I’m trying to put together some rake tasks to run my specs, but
require ‘spec/rake/spectask’ complains “no such file”. I’ve gem
installed rspec on my Ubuntu box and looks like it’s locate in
/var/lib/gems/1.8/gems/rspec-1.1.4/, which is not in load path

irb> $LOAD_PATH
=> [“/usr/local/lib/site_ruby/1.8”,
“/usr/local/lib/site_ruby/1.8/i486-linux”,
“/usr/local/lib/site_ruby/1.8/i386-linux”, “/usr/local/lib/site_ruby”,
“/usr/lib/ruby/1.8”, “/usr/lib/ruby/1.8/i486-linux”,
“/usr/lib/ruby/1.8/i386-linux”, “.”]

Now what? What would be a kosher way around this, maybe ln -s
something somewhere? I can see the issue being discussed though,

On Tue, Jul 29, 2008 at 11:45 AM, Tero T. [email protected] wrote:

“/usr/lib/ruby/1.8/i386-linux”, “.”]

Now what? What would be a kosher way around this, maybe ln -s
something somewhere? I can see the issue being discussed though,
Bug #145267 “Add rubygems bin to PATH” : Bugs : libgems-ruby package : Ubuntu

Did you require rubygems first?

D:\Users\Luis>irb
irb(main):001:0> puts $LOAD_PATH
D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-120/lib/ruby/site_ruby/1.8
D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-120/lib/ruby/site_ruby/1.8/i386-msvcrt
D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-120/lib/ruby/site_ruby
D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-120/lib/ruby/1.8
D:/Users/Luis/ruby/ruby-186-p114-MINGW-rubygems-120/lib/ruby/1.8/i386-mingw32
.
=> nil
irb(main):002:0> require ‘spec/rake/spectask’
LoadError: no such file to load – spec/rake/spectask
from (irb):2:in `require’
from (irb):2
irb(main):003:0> require ‘rubygems’
=> true
irb(main):004:0> require ‘spec/rake/spectask’
=> true

Maybe just a stupid comment, if so, please disregard it.

Luis L.
AREA 17

Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

2008-07-29 11:59, Luis L.:

Did you require rubygems first?

Oh dear! You made my day. \o/

On Tue, Jul 29, 2008 at 12:09 PM, Tero T. [email protected] wrote:

2008-07-29 11:59, Luis L.:

Did you require rubygems first?

Oh dear! You made my day. \o/

Sorry, I’m not a native english speaker, that means it worked? :slight_smile:


Luis L.
AREA 17

Human beings, who are almost unique in having the ability to learn from
the experience of others, are also remarkable for their apparent
disinclination to do so.
Douglas Adams

2008-07-29 12:14, Luis L.:

Oh dear! You made my day. \o/
that means it worked? :slight_smile:

Yes. :slight_smile: