Hi,
I’m a relative newbie to ruby and linux, so please excuse this if it
seems a little naive. Also please accept thanks for all the work that
has gone into a great language.
I thought that if ‘/usr/lib/ruby/1.8’ was in the ruby load path “$:”,
then ruby would search for a 'require’d package in subdirectories
under that directory?
for example (as root):
#gem install ‘fastercsv’ --install-dir=’/usr/lib/ruby/1.8’
This installs without error and fastercsv.rb seems to be where it
should:
/usr/lib/ruby/1.8/gems/fastercsv-1.2.0/lib
now (still with root and the same shell session):
mv-laptop:/usr/lib/ruby/1.8 # irb
irb(main):001:0> require ‘fastercsv’
LoadError: no such file to load – fastercsv
from (irb):1:in `require’
from (irb):1
irb(main):002:0> puts $:
/usr/lib/ruby/site_ruby/1.8
/usr/lib/ruby/site_ruby/1.8/i586-linux
/usr/lib/ruby/site_ruby
/usr/lib/ruby/vendor_ruby/1.8
/usr/lib/ruby/vendor_ruby/1.8/i586-linux
/usr/lib/ruby/vendor_ruby
/usr/lib/ruby/1.8
/usr/lib/ruby/1.8/i586-linux
.
=> nil
irb(main):003:0>
Can anyone please shed some light on what I might have configured
incorrectly?
Regards
Mark