Require library path

Hi,

I want to load the date.rb file, but require ‘date’ results in :

./mk.rb:4:in `require’: no such file to load – date (LoadError)
from ./mk.rb:4

ruby is installed in ~/ruby/rubyinstall/

Apparently Ruby does not look over there, where is Ruby’s library path
defined?

Thanx!

Krekna

“Krekna M.” [email protected] wrote/schrieb
[email protected]:

Apparently Ruby does not look over there, where is Ruby’s library
path defined?

Run this on the shell and look at the output:
ruby -e ‘puts $:’

You may consider to set the environvent variable RUBYOPT, e.g. (bash):
export RUBYOPT=r${HOME}/ruby/rubyinstall

Regards
Thomas

thanks, I did the following now:

$:.push("~/ruby/rubyinstall/lib… etc")

It seems that the problem is that I compiled in the /tmp directory so
the library path points to /tmp/ruby/rubyinstall. I think I need to
recompile to get it in order again.

Krekna

2007/1/30, Thomas H. [email protected]:

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs