Others have already mentioned RUBYLIB, but let me note that the very
myrubylib under site_ruby is not in $:. Thus, you’d need to specify
the parent directoy as well:
require ‘myrubylib/curi’
You load the core library smtp.rb as ‘net/smtp’ because of the same
reason, smtp.rb lives in
/usr/local/lib/ruby/1.8/net/smtp.rb
and the directory in the load path there is /usr/local/lib/ruby/1.8.
RUBYLIB is the canonical solution to that, but at least you know why
your test is not working.
– fxn
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.