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, https://bugs.launchpad.net/ubuntu/+source/libgems-ruby/+bug/145267 -- Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
Luis Lavena
2008-Jul-29 09:59 UTC
[rspec-users] $LOAD_PATH problem when creating rake task
On Tue, Jul 29, 2008 at 11:45 AM, Tero Tilus <tero at tilus.net> wrote:> 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, > https://bugs.launchpad.net/ubuntu/+source/libgems-ruby/+bug/145267 >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 Lavena 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 Lavena:> Did you require rubygems first?Oh dear! You made my day. \o/ -- Tero Tilus ## 050 3635 235 ## http://www.tilus.net/koti/tero/
Luis Lavena
2008-Jul-29 10:14 UTC
[rspec-users] $LOAD_PATH problem when creating rake task
On Tue, Jul 29, 2008 at 12:09 PM, Tero Tilus <tero at tilus.net> wrote:> 2008-07-29 11:59, Luis Lavena: >> Did you require rubygems first? > > Oh dear! You made my day. \o/ >Sorry, I''m not a native english speaker, that means it worked? :-) -- Luis Lavena 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